0.2.2 • Published 5 years ago
webrush v0.2.2
Express.js but faster.
It is a package inspired by nanoexpress. It is powered by uWebsockets.js.
Install with:
npm install webrush
Why?
Was trying to use nanoexpress in a personal project then it went down for some reason. Then I replaced nanoexpress with uWebsockets.js and realized that its syntax was very similar to Express.js, with some little differences. After using it I got bored with confusion that differences made. So I created this package/wrapper.
Implemented features
- get route
- post route
- del route
- put route
- listen function
- res.send, res.json, res.redirect
- webrush.Router, see Examples
Example
const webrush = require('webrush');
const app = webrush();
app.get('/', (req, res) => {
res.send("Hello from webrush!");
});
app.listen(3000, (success) => {
if(success){
console.log("Server started on port:", 3000);
} else {
console.log("Error while listening on port:", 3000);
}
});
There are more examples located in Examples directory.
See Changelog.