Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vimode/node-express-starter
A Node.js Express starter template with basic setup configuration
https://github.com/vimode/node-express-starter
Last synced: 22 days ago
JSON representation
A Node.js Express starter template with basic setup configuration
- Host: GitHub
- URL: https://github.com/vimode/node-express-starter
- Owner: vimode
- License: mit
- Created: 2023-08-05T14:40:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-05T19:16:38.000Z (over 1 year ago)
- Last Synced: 2024-05-02T06:11:10.267Z (8 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExpressJS Starter Template
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/Vp8hse?referralCode=vimo)
This is boilerplate/starter project for quickly building RESTful APIs using Node.js and [Express](https://expressjs.com/), written in JavaScript.
It will help you get started with a simple to follow format with some examples for routes, logging and middleware.## Includes
### Server utilites:
- [morgan](https://www.npmjs.com/package/morgan)- HTTP request logger middleware for Node.js
- [dotenv](https://www.npmjs.com/package/dotenv)- Loads environment variables from `.env` file into `process.env`
- [cors](https://www.npmjs.com/package/cors)- CORS provides a Connect/Express middleware that can be used to enable CORS with various options.### Development utilites
- [nodemon](https://www.npmjs.com/package/nodemon)- Helps develop node.js based application by automatically restarting the node server when it detects application file changes.
## Commands
### Setup
```
yarn
```### Development
```
yarn dev
```## About
The server runs a simple Express API server
`/` returns `status: ok`
`/hello` returns `message: Hello World!`
Unknown endpoints are handled in a middleware file.
The `hello` route is defined in the `helloRoute`
## Project Structure
```
src\
|--routes\ # Routes
|--utils\ # Utility files
|--app.js # Express app
|--index.js # App entry point
```