npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

websico

v1.3.0

Published

A robust and versatile web server framework for Node.js, inspired by Express.js

Downloads

5

Readme

Websico - A Modern Node.js Web Framework

Welcome to Websico, a versatile and lightweight web framework inspired by the simplicity and expressiveness of Express.js. Websico is designed to streamline your Node.js web development experience, providing a simple yet powerful foundation for building web applications, APIs, and more.

GitHub license GitHub issues GitHub stars

Table of Contents

  1. Installation
  2. Getting Started
  3. Features
  4. Middleware
  5. Routing
  6. Extensibility
  7. Error Handling
  8. Expressive API
  9. Developer Note
  10. Documentation
  11. Contributing
  12. License
  13. Contact

1. Installation

To add Websico to your project, run the following npm command:

npm install websico

2. Getting Started

Initialize Websico in your project with the following code:

const websico = require('websico');
const app = websico();

app.listen(3000, () => {
    console.log("Server started: 3000");
});

app.get('/', (req, res) => {
    res.send("Hello, Websico!");
});

3. Features

3.1 Lightweight

Websico is designed to be a minimalistic framework, ensuring your codebase remains clean and efficient.

3.2 Routing

Define routes effortlessly and handle various HTTP methods such as GET, POST, PUT, DELETE, etc.

3.3 Middleware

Enhance your application's functionality with middleware, allowing for custom processing of requests and responses.

3.4 Extensibility

Easily extend Websico's capabilities through middleware or by creating custom plugins tailored to your project's needs.

4. Middleware

// Example middleware to log incoming requests
app.use((req, res, next) => {
    console.log(`Received request at ${req.url}`);
    next();
});

5. Routing

// Handling GET request at the root endpoint
app.get('/', (req, res) => {
    res.send("Welcome to Websico!");
});

// Handling POST request at /api
app.post('/api', (req, res) => {
    res.json({ message: "Data received successfully" });
});

6. Extensibility

Websico provides a robust architecture for extending functionality. Consider creating custom plugins for your specific use cases.

7. Error Handling

// Handling 404 errors
app.use((req, res) => {
    res.status(404).send("Page not found");
});

// Handling other errors
app.use((err, req, res, next) => {
    console.error(err.stack);
    res.status(500).send("Something went wrong!");
});

8. Expressive API

Websico's API is designed to be clear and expressive, making it easy to understand and work with.

9. Developer Note

Websico is inspired by the developer-friendly nature of Express.js. We aim to provide a similar experience, making it easy for developers familiar with Express.js to transition seamlessly to Websico.

10. Documentation

For detailed documentation and examples, visit Websico Documentation.

11. Contributing

We welcome contributions! Feel free to open issues or submit pull requests. Please follow our Contribution Guidelines.

12. License

This project is licensed under the MIT License - see the LICENSE file for details.

13. Contact

For inquiries or support, reach out to us at [email protected].

Happy coding with Websico! 🚀

Technical Support by https://thintry.com/