This project shows some basic usage of Express.js features, including:
- handling incoming HTTP requests using express routes
- exploring the purpose of middleware and how it works
- debugging express apps using morgan and Postman
- handling data included in HTTP POST requests
- handling file uploads using multer
- making requests from express to external APIs with axios and serving the data to the client
- setting environmental variables using dotenv
- use of a
.gitignore
file to exclude 3rd-party code and autogenerated files from version control tracking - use of a
package.json
with npm to track dependencies and streamline installation.
Many of the features of Express exhibited in this project are explained at a high level in this prepared lecture presentation.
There are some common practices that we have not included here, since we believe they are distraction's from a beginner's ability to master React's code patterns.
- inclusion of any front-end code
- inclusion of user account registration or log in functionality
- inclusion of unit testing modules, like mocha and chaai
- use of express-router
In the project directory, you can run:
Installs all the dependencies listed in the package.json
configuration file.
This is necessary before running the app, since the 3rd-party dependency code is excluded from version control by the .gitignore
git settings file.
Start up the web server application using nodemon
, which will stop and restart the app anytime there is a code change.