https://github.com/nrcool/express-server-kit
https://github.com/nrcool/express-server-kit
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nrcool/express-server-kit
- Owner: nrcool
- Created: 2023-05-08T18:49:06.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-11T07:18:03.000Z (about 2 years ago)
- Last Synced: 2024-10-14T13:02:40.146Z (8 months ago)
- Language: JavaScript
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# express-server-kit
[](https://www.npmjs.com/package/express-server-kit)
[](https://www.npmjs.com/package/express-server-kit)
[](https://www.npmjs.com/package/express-server-kit)
# Express-Server BoilerplateA boilerplate/starter project for quickly building RESTful APIs using Node.js, Express, and Mongoose.
By running a single command, you will get a production-ready Node.js app installed and fully configured on your machine.
## Installation 🏭
```bash
$ npm install -g express-server-kit
```
OR```bash
$ npx express-server-kit project_name
```
## Quick Start 🏃♂️The quickest way to get started with express is to utilize the executable `express-server` to generate an application as shown below:
create (and start) the app (in `project_name` folder):
```bash
$ express-server project_name
$ cd project_name
$ npm run dev
```
OR Create (and start) the app in current folder:```bash
$ express-server .
$ npm run dev
```This will basically create this structure in your folder
```bash
.....................................
├── .env
├── .gitignore
├── app.js
├── node_modules
| └── ....
├── package-lock.json
├── package.json
├── routes
| └── indexRoute.js
| └── userRoutes.js
├── controllers
| └── indexControllers.js
| └── userControllers.js.js
├── models
| └── userModels.js
├── views
| └── index.html
.....................................
```## Environment Variables
The environment variables can be found and modified in the `.env` file. They come with these default values:
```js
#port
PORT=4000#mongodb uri
URI=mongodb://127.0.0.1:27017#mongodb database
DB=my_database
```## What dependencies it installs ?
- **express** - express framework
- **mongoose** - Mongoose(MongoDB object modeling tool)
- **dotenv** - for env variables
- **cors** - enable CORS
- **http-errors** - to create http errors
- **morgan** - to log http requests
- **nodemon** (dev) - monitors changes in files## Author ✍️
[**Naqvi 🇩🇪 **](https://github.com/nrcool)## Contribute 🤝
You can fork this repo and send me a PR.