Skip to content

rdhelms/node-typescript-pg-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tools Summary

Prerequisites

Install Node and PostgreSQL

Run the following to create the test and dev databases, replacing app with the name of your app:

createdb app_test;
createdb app_dev;

Installation

npm install

Environment Variables

Create a root .env file with contents in the format VAR=VALUE in order to specify environment variables when running the app locally.

For example,

TEST_DATABASE_URL=postgres://localhost/app_test
DATABASE_URL=postgres://localhost/app_dev
NODE_ENV=development

Building the App

npm run build

Delete dist folder and then rebuild

npm run build-clean

Build and watch for changes

npm run build-watch

Linting

npm run lint

Testing

npm test

Generate Test Coverage

npm run coverage

View Test Coverage

npm run view-coverage

Starting the App

npm start

To delete and build the dist folder, run the linter, and start the server:
npm restart

Deploying the App

Provisioning the Heroku Postgres addon [Info]

For help deplying a Node.js app to heroku:
Getting Started on Heroku with Node.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published