DEV Community

lineldcosta
lineldcosta

Posted on • Updated on • Originally published at github.com

Boilerplate for nodejs, typescript - simple folder structure

This is a simple boilerplate application to start the project from scratch using typescript and nodejs.

If you are working on freelance projects and wanted to quickstart the project with all the initial setup having simple architechture, use this setup and finish requirement on time :-)

GitHub logo lineldcosta / typescript-node-rest-api-boilerplate

Node.js REST API boilerplate built with typescript, Node, Jest, pm2, express, postgresql, slonik

This is rest based nodejs boilerplate application, which uses router-services-model architecture.

Requirements

NodeJS

Install global TypeScript and TypeScript Node

npm install -g typescript ts-node

Clone this repository

git@github.com:lineldcosta/typescript-node-rest-api-boilerplate.git

Then install the dependencies

npm install

To Run the application in production mode

yarn start-prod

To Run the application in development mode

yarn start-dev

To Run the tests

Yarn jest



It uses the best approaches available to create typescript-nodejs API.

Requirements

  • NodeJS

Install global TypeScript and TypeScript Node

 npm install -g typescript ts-node 
Enter fullscreen mode Exit fullscreen mode

Clone this repository

 git@github.com:lineldcosta/typescript-node-rest-api-boilerplate.git

Enter fullscreen mode Exit fullscreen mode

Then install the dependencies

 npm install
Enter fullscreen mode Exit fullscreen mode

To Run the application in production mode

 yarn start-prod
Enter fullscreen mode Exit fullscreen mode

To Run the application in development mode

 yarn start-dev
Enter fullscreen mode Exit fullscreen mode

To Run the tests

 Yarn jest
Enter fullscreen mode Exit fullscreen mode

Happy coding...! If you like then don't forget to star itt!!!

Top comments (2)

Collapse
 
steve-lebleu profile image
Steve Lebleu

About this subject, see a small contribution here : github.com/konfer-be/ts-express-ty...

Collapse
 
lineldcosta profile image
lineldcosta

Looks good!