06 start node coding

Post on 19-Mar-2017

52 Views

Category:

Engineering

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Start Node CodingAhmed Elbassel

Email: elbassel.n13@gmail.comSkype: ahmed_elbassel

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

top related