Skip to content

A straightforward exhibition of some core features and best practices of using express.js.

License

Notifications You must be signed in to change notification settings

thericfang/express-js-starter-app

Repository files navigation

Express.js Starter App

Concept

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.

Intentional exclusions

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

Available Scripts

In the project directory, you can run:

npm install

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.

nodemon server

Start up the web server application using nodemon, which will stop and restart the app anytime there is a code change.

About

A straightforward exhibition of some core features and best practices of using express.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published