- npm: tool used for managing JavaScript packages
- React applications:
create vite@latest -- --template react - Backend exercises:
npm init,npm install express(library) - Build the backend on top of NodeJS, which is a JavaScript runtime based on Google's Chrome V8 JavaScript engine
- Interactive node-repl: https://nodejs.org/docs/latest-v18.x/api/repl.html
json-serveris a mock REST API server built with Node.js- It allows you to create a fake backend quickly using just a
db.jsonfile. Use case: Quick API mocking, demos, front-end development without backend
Node.jsis a JavaScript runtime (built on Chrome’s V8 engine)- It allows you to run JavaScript on the server side
- Libraries to ease server-side development with Node: ExpressJS (most popular), NestJS Use case: Real applications, production APIs, complex logic, integrations
Representational State Transfer, aka REST Operations on resources:
- GET: fetch a single or all resources
- POST: creates a new resource based on the request data
- DELETE: removes
- PUT: replaces the entire identified resource with the request data
- PATCH: replaces a part of the identified resource with the request data Properties related to request types:
- GET, HEAD: safety
- All requests except POST: idempotency
- Command line program
curl - Postman: Postman Desktop, also on VS Code extension
- VS Code REST Client plugin:
requests/file.restwith REST client requests; by clickingSend Requesttext, the REST client will execute the HTTP request and the response from the server is opened in the editor. instructions documentation
- Visual Studio Code's
- Chrome developer console: start the application with
node --inspect index.js