Skip to content

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

License

Notifications You must be signed in to change notification settings

raphaellima8/typescript-api

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6c13001 · Dec 1, 2023

History

90 Commits
Apr 8, 2017
Jul 12, 2017
Jul 12, 2017
Mar 24, 2017
Feb 2, 2017
Jan 25, 2017
Jul 11, 2017
Jul 12, 2017
Feb 10, 2017
Jan 15, 2017
Jul 12, 2017
Feb 14, 2017
Dec 1, 2023
Apr 18, 2017

Repository files navigation

TypeScript API Starter - Node + TypeScript + Sequelize + PostgreSQL

Build Status Code Health

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's properties in the below files:

/server/config/env/development.env.js
/server/config/env/test.env.js

Start server:

npm run watch

Integration Tests:

npm run integration-test

Unit Tests:

npm run unit-test

Coverage:

npm run test:coverage

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's 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

Releases

No releases published

Packages

No packages published