This is boilerplate of express, typescript and postgreSql with typeorm and docker based setup

Overview

express-typescript-postgres-typeorm-docker-swagger-boilerplate

This is boilerplate of express, typescript and postgreSql with typeorm and docker based setup

❯ Getting Started

Step 1: Set up the Development Environment

You need to set up your development environment before you can do anything.

Install Node.js and NPM

Install a postgreSQL database.

Step 2: Create new Project

Clone this project.

Now, after installing dependencies create one "development.env" file from ".env.example" file (copy content from '.env.example' to 'development.env')

Then set devlopment.env as a .env for that fire this command "export NODE_ENV=development"`. In this file you have to add your database connection information.

Create a new database with the name you have in your .env-file.

Then setup your application environment. (With "npm i" command)

This installs all dependencies with npm. After that it migrates the database and seeds some test data into it. So after that your development environment is ready to use.

Here, if want to run DB from docker than follow the step as below Step 1: install docker & docker-compose on your machine Step 2: Then give permission to you current machine docker to run without sudo (command : sudo chmod 666 /var/run/docker.sock) Step 3: Run docker (docker-compose up -d) (Here, I have already set docker-compose.yml file with postgreSql and cuurent project deployed on docker with 8000 port) Step 4: To check docker is working proper (command: Command: docker ps -a) Step 5: Check for particular docker container (command: docker logs -f ) --- NAMES = Container name Now move on to Project architecture side,

Step 3: Serve your App

Go to the project directory and start your app with this npm script.

npm run dev

This starts a local server using nodemon, which will watch for any file changes and will restart the sever according to these changes. The server address will be displayed to you as http://0.0.0.0:9001. ( this command set for nodemon and typescript build commnad both working as parallely)

Then project run successfully on port 9001 Here, I have already set swagger.json file with all route set on swaggger

For swagger Swagger documentation path: "http://localhost:9001/docs/"

Here, you find all this api with method and route config.

Two basic api for check server and Db work proper or not?

  1. GET: http://localhost:9001/health-check
  2. GET: http://localhost:9001/server-check

NOTE: ALL API RESPONSE FORMAT IS : { "success": true, "httpStatusCode": 200, "message": "Hello World perro", "data": {id: 1, name: "perro"} // Data could be anything }

You might also like...

Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan CLI Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose. What is A

Aug 17, 2022

An example T3 app containerized with Docker, Docker Compose, and deployed on Railway

Create T3 App This is an app bootstrapped according to the init.tips stack, also known as the T3-Stack. What's next? How do I make an app with this? W

Dec 19, 2022

Boilerplate / monorepo setup intended for npm package development

Assemble Package Set up: After creating your new repo from the github template plan out what your package(s) will be named and modify the contents of

Dec 15, 2022

API em NodeJS, utilizando banco de dados MongoDB (TypeORM), com cobertura de testes (coverages), utilizando o Jest

API em NodeJS, utilizando banco de dados MongoDB (TypeORM), com cobertura de testes (coverages), utilizando o Jest

Api Backend Tindin Sobre API em NodeJS, utilizando banco de dados MongoDB (TypeORM), com cobertura de testes (coverages), utilizando o Jest. 👉 app ur

Jan 20, 2022

Smart-face-detector - A face detector application made with React JS, Node JS, Express JS, and PostgreSQL.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Sep 24, 2022

A secure MERN Stack boilerplate ready for Production that uses Docker & Nginx.

A secure MERN Stack boilerplate ready for Production that uses Docker & Nginx.

A production ready & secure boilerplate for the MERN Stack that uses Docker & Nginx. Focus on the product and not the setup. You can directly start wo

Dec 23, 2022

Express.js framework boilerplate with TypeScript, Prisma, ESLint, Husky and Jest

Express.js framework boilerplate with TypeScript, Prisma, ESLint, Husky and Jest

Setup a Node.js project with Typescript, Prisma ESLint, Prettier, Husky Node.js boilerplate with Express.js, TypeScript, Prisma, ESLint, Prettier, Hus

Dec 12, 2022

This is another Express + TypeScript + DDD (Domain Driven Design patterns) + IoC/DI (Inversion of control and Dependency injection) + Primsa ORM + API REST boilerplate.

Express-TS-DDD REST API This is another Express + TypeScript + DDD (Domain Driven Design patterns) + IoC/DI (Inversion of control and Dependency injec

Nov 3, 2022

GraphQL-first boilerplate that scales with TypeScript + Node Express + Apollo GraphQL APIs.

graphql-typescript-boilerplate A boilerplate project for quickly building Graphql APIs and with typescript 🚀 Installation Install the dependencies: y

May 15, 2022
Owner
beBhavyhere
beBhavyhere
A Restaurant (Table) Reservation API built with Node, TypeScript, Express, TypeORM, a MySQL DB, all running on Docker containers

Restaurant (Table) Reservation API A simple API for reserving tables at a restaurant. The API is based on the REST architectural style and uses Node.j

null 14 Oct 5, 2022
🐶 Puppies Rest Api built with NestJs, TypeOrm, PostgreSQL, Swagger

?? Quick start: Install node Install nest cli: `npm i -g @nestjs/cli` Initialize a nestjs project `nest new project-name` Swagger Docs swagger docs P

Ogunnusi Abayomi Joseph 3 Oct 1, 2022
A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

ExpressJs-Boilerplate An ExpressJs boilerplate configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses

Hammas bin Farrukh 4 Mar 8, 2023
Remix TypeScript monorepo with Turborepo pipelines, Prisma, PostgreSQL, Docker deploy to Fly.io, pnpm, TailwindCSS and Tsyringe for DI.

Remix template with Turborepo, TypeScript and pnpm. The remix app deploys to fly.io or build to Docker image. Example packages for Database with prisma, Tsyringe dependency injection, UI, and internal TypeScript packages.

Philippe L'ATTENTION 33 Dec 29, 2022
React-typescript-boilerplate setup🌐🚀

A react-typescript boilerplate including prettier eslint lint-staged husky Docs TypeScript is a strongly typed programming language that builds on Jav

Shubham Jadhav 12 Dec 29, 2022
Simple REST API using Express with TypeScript, PostgreSQL, and MySQL to practice the Clean Architecture by Uncle Bob.

Clean-Architecture Simple REST API using Express with TypeScript, PostgreSQL, and MySQL to practice the Clean Architecture by Uncle Bob. About This RE

Abdullah Adel 10 Oct 16, 2022
Node, Typescript, PostgreSQL, Express

Objective Your challenge is to build out this full-stack todo app and get it looking as close to the design as possible. Brief Using the language spec

Daniel Scott 4 Oct 12, 2022
A Turborepo with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose

Turborepo + Strapi + Next.js + Docker A Turborepo with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose. ⚠️ Prerequisit

Elvin Chu 60 Dec 29, 2022
Docker Extension to backup and restore docker volumes.

vackup-docker-extension This repository contains a Docker Extension that backups Docker volumes. This extension is purely a demonstration of how it'd

Felipe Cruz Martinez 34 Dec 28, 2022
This provides an extension integration with Docker Desktop to run k9s quickly and easily through the Docker Desktop interface.

k9s extension for Docker Desktop This provides an extension integration with Docker Desktop to allow k9s quickly and easily through the Docker Desktop

James Spurin 14 Dec 16, 2022