Last active
June 17, 2018 09:16
-
-
Save Nishchit14/5caca2aad21e31b91ff055f1256b9d0d to your computer and use it in GitHub Desktop.
Express vs Koa vs Hapi - Server setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Expressjs server setup | |
const express = require('express'); | |
const app = express(); | |
let server = app.listen(3000, ()=> { | |
console.log('Express is listening to http://localhost:3000'); | |
}); | |
//Koajs server setup | |
const koa = require('koa'); | |
const app = koa(); | |
let server = app.listen(3000, ()=> { | |
console.log('Koa is listening to http://localhost:3000'); | |
}); | |
//Hapijs server setup | |
const hapi = require('hapi'); | |
const server = new hapi.Server(3000); | |
server.start(()=> { | |
console.log('Hapi is listening to http://localhost:3000'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment