typescript-api

API desenvolvida com Typescript, ES6, Node, PostgreSQL e Docker

TypeScript API Starter - Node + TypeScript + Sequelize + PostgreSQL

Dependencies

  • node
  • npm
  • typescript
  • gulp
  • PostgreSQL
  • Sequelize
  • Docker

Getting Started

Clone this repo:

git clone https://github.com/raphaellima8/typescript-api.git ts-api && cd ts-api

Install dependencies:

 npm i

Set the values to environment variables in the below files:

scripts/server.sh
scripts/test.sh

Start server:

npm run watch

Tests:

npm run test

If Docker

Run:

[sudo] docker build -t <image_name> .
[sudo] docker run -d -p 9000:3000 --name <label> <image_name>

Connect to the container:

[sudo] docker exec -it <id_container> /bin/bash

Run the commands below in the container terminal:

su postgres
/etc/init.d/postgresql start
psql -c "ALTER USER postgres WITH PASSWORD 'your_password'"
psql -c "CREATE DATABASE api OWNER postgres"
npm run watch

License: MIT

Related Repositories

AtomicGameEngine

AtomicGameEngine

The Atomic Game Engine is a multi-platform 2D and 3D engine with a consistent API in C#, JavaScript, TypeScript, and C++ (https://www.AtomicGameEngine.com) ...

NSwag

NSwag

The Swagger API toolchain for .NET, Web API and TypeScript. ...

node-typescript-koa-rest

node-typescript-koa-rest

REST API boilerplate using NodeJS and KOA2, typescript. Logging and JWT as middlewares. TypeORM with class-validator, SQL CRUD. Docker included. Valuable README ...

ews-javascript-api

ews-javascript-api

EWS API for TypeScript/JavaScript - ported from OfficeDev/ews-managed-api - node, cordova, browser ...

typescript-simple

typescript-simple

Simple API to compile TypeScript code string to JavaScript. That's all! ...