{"repo":"rootstrap/node-ts-api-base","free":true,"listed":false,"github":"https://github.com/rootstrap/node-ts-api-base","clone":"git clone https://github.com/rootstrap/node-ts-api-base.git","description":"REST API boilerplate made with Express + NodeJS","language":"TypeScript","stars":109,"topics":["typescript","rest-api","expressjs","nodejs","typeorm"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"Node-TS-Api-Base This project includes the boilerplate for a basic rest-api made in Node.JS with Express + Typescript. Basic Requirements 1. Install Node.js (lts-version v14.16.0) 2. Install yarn if not present curl -o- -L https://yarnpkg.com/install.sh bash (macOS and generic Unix environments) 3. Install required dependencies by yarn 4. cp .example.env .env.dev 5. cp .example.env.test .env.test 6. Create your DB (i.e. psql for Postgres: psql -U -h -c \"create database ;\" ) with same name as your .env file. 7. Run ENV=[dev, test, prod] yarn db:setup . 8. Start your server with ENV=[dev, prod] yarn dev . Some scripts Add ENV=[dev, prod] before running scripts. Why?: Configuration file used by Typeorm Run yarn build to build js from typescript source. Run yarn start to start the server from the compiled folder (/dist). Run yarn test to run tests. Run yarn dev to start and automatically detect any source-code changes, restarting the server as well. Run yarn typeorm schema:drop to drop your schema of the DB. Run yarn typeorm schema:sync to resync the schema of your DB. Run yarn seed:run to run seed files. Run yarn db:reset to drop schema and re run it, then seed the DB. Run yarn typeorm migration:generate -n to create a new migration. Run yarn typeorm migration:run to run pending migrations. Run yarn typeorm migration:revert to rollback migrations. Run yarn typeorm migration:show to see the list of all migrations (pending and also ran). Github Actions Our CI workflow is based on ","default_branch":null,"files":null,"tree":[],"storefront":"/r/rootstrap","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rootstrap/node-ts-api-base/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}