06 start node coding
TRANSCRIPT
Start Node Coding
- HTTP Server
- HTTP Server - reply with html file
- URIs and Parameters.
HTTP Server
- Create http server using http package:
HTTP Server - reply with html file
- Reply with HTML file, use fs package.
- For more about fs package: click here
URIs and Parameters
Exercise
- You should write an application that provide api to do the following four operations:
- *, +, -, /
- Your Api should be as the following:
- localhost:3000/calc?num1=4&num2=9&oper=add|mul|sub|div
- Anything other than calc route should return an error message please use the right data.
- If operation other that the above four operation, return an error message displaying that only four operations supported
Questions