A reusable template for an Express.js webserver. Can be used to deploy your own APIs quickly using the worlds most popular web framework for Node.js.
- Use the green button at the top right to make your own repository with the same basic files and file structure.
- Navigate into the base directory of the folder with your CMD/Terminal.
- Run the command
npm install
, this will download all the required dependencies. - Customise to your hearts content!
- Run the server with
node app
, it runs on port 3006 by default.
- Express.js - The core part of the repository, this handles the webserver for you.
- Dotenv - Easy way to use enviroment variables, useful for holding API keys you might need!
- Body-Parser - Needed to parse bodys of requests coming in.
- Express-Session - Handles user session data.
- Uniqid - Generates a unique number for the session key.
Technically all you need for a simple web-server is Express.js, but these above dependencies are used frequently so may come in handy.