themorrisonagency / hoots-locations-node

NodeJs, GraphQL, Typescript, Redis, Postgres API boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NGT API Boilerplate

Simple Node/Express/GraphQL/Typescript API boilerplate.


Under the hood

-Postgres for database.

-Uses Redis for caching.

-TypeORM for entities

This is a simple API boilerplate based off the fantastic Youtube series by Ben Awad where he builds a full stack Reddit clone. This is the Backend portion that I have modified slightly.


Setup

To get up and running I have included a sample User resolver and entitiy. This should include everything you need to handle basic registration/login/reset-password functionality.

npm install

to generate example .env file

gen-env

The first time you may need to run

npm run build

to compile Typescript.

After that you can run

npm run start

Example ENV

DATABASE_URL=postgresql://user:password@localhost:port/databaseName
REDIS_URL=127.0.0.1:6379
PORT=4000// Port to run express on
SESSION_SECRET=ThisIsMySecretYo
// Address of frontend
CORS_ORIGIN=http://localhost:3000
RUN_MIGRATIONS=false

About

NodeJs, GraphQL, Typescript, Redis, Postgres API boilerplate


Languages

Language:JavaScript 61.8%Language:HTML 26.1%Language:TypeScript 10.5%Language:CSS 1.5%Language:Dockerfile 0.1%Language:Shell 0.0%