This is a simple own creation of my own basic router, similar to express.js and simple application to test the data. This router consists of following features:
- register routes associated callbacks with
app.get()
orapp.post()
, - starts up a server with
app.listen()
- parses Path Patterns and associates them with called routes in the browser
- parameterizes Routing so to get the params, matches patterns in the app with paths clled in the broswer on in bash
- enabled POST requests and parses POST data
- enabled RESTful HTTP methods: get, post, put, patch, delete
If you have installed node on your computer, type the following commands
$ node app.js
and go to your browser to localhost:4000
- Dariusz Biskupski - Initial work - https://dariuszbiskupski.com
This assignment is created for Viking Education