generator-ts-node-api
v1.2.0
Published
Node API with typescript
Downloads
2
Maintainers
Readme
Node.js Express API with TypeScript
Node.js Express API with TypeScript. Supports MongoDB
Description
This generator will help you to build your own Node Express Web API using TypeScript. You'll be able to connect to your MongoDB database. Feel free to leave your suggestions and help us to improve this generator.
Installation
First, install Yeoman and generator-ts-node-api using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-ts-node-api
Then generate your new project:
yo ts-node-api
Running the API
Development
To start the application in development mode, run:
npm run dev-server
The developer mode will watch your changes then will transpile the TypeScript code and re-run the node application automatically.
Production
First, create the prod.env
file inside the config
folder. Make sure that file contains all your production environment variables, like the dev.env
file.
To build the API, run:
npm build
Then, start the application or deploy the files in dist
directory:
npm start
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
MIT © Caio Souza & Petrus Cyrino