Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matheusdavidson/express-typescript-mongoose-starter
A starter for Node JS, Express, Typescript, Mongoose application
https://github.com/matheusdavidson/express-typescript-mongoose-starter
api express express-boilerplate express-generator expressjs mongodb mongoose node node-boilerplate nodejs rest-api restful-api typescript typescript-boilerplate typescript-generator typescript2
Last synced: 5 days ago
JSON representation
A starter for Node JS, Express, Typescript, Mongoose application
- Host: GitHub
- URL: https://github.com/matheusdavidson/express-typescript-mongoose-starter
- Owner: matheusdavidson
- Created: 2017-07-31T02:59:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-27T02:54:12.000Z (about 7 years ago)
- Last Synced: 2024-11-01T05:42:34.394Z (12 days ago)
- Topics: api, express, express-boilerplate, express-generator, expressjs, mongodb, mongoose, node, node-boilerplate, nodejs, rest-api, restful-api, typescript, typescript-boilerplate, typescript-generator, typescript2
- Language: TypeScript
- Size: 30.3 KB
- Stars: 22
- Watchers: 5
- Forks: 17
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Pull Requests are welcome ;)**
# Quickstart application with Express, Typescript, Mongoose
This project is a starter for express, typescript and mongoose application, designed for Restful API's, but you can easily extend to make other things.I couldn't find any complete guide to archieve this, so i've looked many tutorials and posts about express with typescript and came up with seed application.
## Prerequisites
1. Latest version of Node to be installed(i recommend NVM, easier to install and possible to work with multiple node versions).
2. Install MongoDB and make sure it is running on default port 27017 (if not then please configure constants.ts and change the connection for mongoDB).## Steps to run
```sh
npm install <= install all the npm Dependencies
npm run dev <= start the Nodemon and watch for changes.
```## Directory Structure
```
express-typescript-mongoose-starter
├── dist <= typescript will compile js to this folder
├── node_modules
├── src
│ ├── .env <= for production, for other envs, use: .env.${NODE_ENV}
│ ├── api
│ │ ├── example <= Replace example for feature name
│ │ │ ├── example.controller.ts
│ │ │ ├── example.model.ts
│ │ │ ├── example.router.ts
│ ├── config
│ │ ├── express.ts
│ │ ├── routes.ts
│ ├── server.ts
│ ├── tsconfig.json
├── package.json
├── tsconfig.json
├── README.md
```
## Todo
- [ ] Add JWT based authentication with passport.js
- [ ] Add socket.io and inject socket instace to routes and controller
- [ ] Command line support to generate libraries, modules, routes and controllers## License
MIT