open-index/open-npm huggingface dataset:
npm package: @pro303/http-server
Description: Simple HTTP server with sessions and CORS enabled.
Author: PRO303
Latest version: 0.0.7

Simple HTTP server with sessions and CORS enabled.

Can be used for making APIs.

API example:

```
       class TestApi extends HttpServer {
            constructor () {
                super ();
            }

            onGetRequest (req, res) {
                switch (req.path) {
                    case '/api':
                        res.json({text: 'api endpoint without parameters'})
                }
            }

        }

```