-
Notifications
You must be signed in to change notification settings - Fork 4
Creating A Server
Amir Yasin edited this page Jan 19, 2015
·
1 revision
Creating an FRHTTP server is extremely trivial (at it's most simple, it involves 2 lines of code).
First, install the frhttp library like so:
npm install frhttpOnce done, you can create a server like so:
var server = require('frhttp').createServer();
server.listen(9000);These two lines of code start a server listening on localhost:9000. Of course this server isn't very useful as it only returns 404 page not found no matter what address we try. To make it respond to routes, read the next section.
Docs
Tutorials