My solutions to assignments from the Node.js course by Maximilian Schwarzmüller.
- Spin up a Node.js-driven Server (on port 3000)
- Handle two Routes: "/" and "/users"
- Return some greeting text on "/"
- Return a list of dummy users (e.g.
<ul><li>User1</li></ul>)
- Add a form with a "username"
<inpu>to the "/" page and submit a POST request to "/create-user" upon a button click - Add the "/create-user" route and parse the incoming data (i.e. the username) and simply log it to the console
- Create a npm project and install Express.js (Nodemon if you want)
- Create an Express.js app which funnels the requests through 2 middleware functions that log something to the console and return one response
- Handle requests to "/" and "/users" such that each request only has one handler/middleware that does something with it (e.g. send dummy response)
- Create a npm project and install Express.js (Nodemon if you want)
- Create an Express.js app which servers two HTML files (of your choice/with your content) for "/"and "users".
- Add some static (.js or .css) files to your project that should be required by at least one of your HTML files.