Powerful server for Node.js that just works so you can focus on your awesome project:
// Include it and extract some methods for convenienceconst server = ;const get post = serverrouter;// Launch server with options and a couple of routes;
Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.― Edsger W. Dijkstra
There's a whole tutorial on getting started for beginners but the quick version is to first install
server as a dependency:
npm install server
Then you can create a file called
index.js with this code:
// Include the server in your fileconst server = ;const get post = serverrouter;// Handle requests to the url "/" ( );
Execute this in the terminal to get the server started:
And finally, open your browser on localhost:3000 and you should see your server answering 'Hello world!'.
The library is documented here:
Subscribe here to receive tutorials when released. Tutorials are good for learning while the documentation is good for reference/quick use once you know the basics.
You can also download the repository and try the examples by browsing to them and
node . inside each of them in
server is great for many situations. Let's see some of them:
Everything works out of the box, you get great support for most features and you can easily tap into Express' middleware ecosystem. What's not to love?
Some of the included features: body and file parsers, cookies, sessions, websockets, Redis, gzip, favicon, csrf, SSL, etc. They just work so you will save a headache or two and can focus on your actual project. Get a simple form going:
const server = ;const get post = serverrouter;const render redirect = serverreply;;
From the flexibility and expressivity of the bundle, designing APIs is a breeze:
// books/router.jsconst get post put del = ;const ctrl = ;moduleexports =;
Websockets were never this easy to use! With socket.io on the front-end, you can simply do this in the back-end to handle those events:
// chat/router.jsconst socket = ;const ctrl = ;moduleexports =;
Licensed under the MIT License. See LICENSE for the full license.
I love using my work and I'm available for contractor work. Freelancing helps maintain
You can also sponsor the project, get your logo in here and some other perks with tons of ♥