Skip to content

Hasty-Server is a lightweight web framework that includes a built-in reverse proxy, designed for seamless container deployment.

License

Notifications You must be signed in to change notification settings

sooryadev007/hasty-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hasty

Hasty server is a simple web framework to build webserver in a simple way. It is inspired by Express.js. Bascially, It is my implementation of HTTP using raw TCP Socket in Javascript.

table of contents

Note

This is a work in progress and not ready for production. It is just a fun project to learn how HTTP works under the hood.

-  Currently, It only supports GET and POST request.

Installation

npm install hasty-server

Usage

**Common JS**
const Hasty = require('hasty-server');
const  server = new  Hasty();

server.get('/', (req, res) => {
    res.send('Hello World');
});

server.listen(8080, () => {
    console.log('Server is running on port 3000');
});
**ES6**
import Hasty from 'hasty-server';
const  server = new  Hasty();

server.get('/', (req, res) => {
    res.send('Hello World');
});

server.listen(8080, () => {
    console.log('Server is running on port 3000');
});

About

Hasty-Server is a lightweight web framework that includes a built-in reverse proxy, designed for seamless container deployment.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%