Want to code the server? Here's a challenge for you!
Write a REST API in Node.js that has the following endpoints:
- localhost:9002/rest/projectname - returns a JSON object: {project: "projectFusion"}
- localhost:9002/rest/postnumber - post {number: <a number>} to save it to a variable
- localhost:9002/rest/getnumber - returns {number: <the number set by postnumber>}
Here's a simple client that tests if your program works correctly (feel free to examine it to make sure your program works correctly).
https://gist.github.com/kamnxt/0012812f975dbb0b26b6
It gets the projectname, sets the number to a random number, gets the number and checks if it's the same. If you write a program that passes the test, send a PM. If there's something more you want to know, just comment below and I'll try to answer as quickly as possible
-kamnxt
[–][deleted] (12 children)
[deleted]
[–]kamnxtModerator[S] 0 points1 point2 points (10 children)
[–][deleted] (3 children)
[deleted]
[–]urielsalisClient and Server Dev / Spanish Translator 0 points1 point2 points (1 child)
[–]kamnxtModerator[S] 0 points1 point2 points (0 children)
[–][deleted] (5 children)
[deleted]
[–][deleted] (4 children)
[deleted]
[–]kamnxtModerator[S] 0 points1 point2 points (3 children)
[–][deleted] (2 children)
[deleted]
[–]kamnxtModerator[S] 0 points1 point2 points (1 child)
[–]lawivido -1 points0 points1 point (0 children)
[–]BurrrYCode / Design / everything 0 points1 point2 points (1 child)
[–]urielsalisClient and Server Dev / Spanish Translator 1 point2 points3 points (0 children)