/setup-node-typescript

Primary LanguageDockerfileMIT LicenseMIT

Node.js TypeScript API with Docker

This is a sample project demonstrating a simple setup to build an API using Node.js, TypeScript, and Docker.

Prerequisites

Ensure that you have Node.js (v18.13.0), Yarn (v1.22.19), and Docker (24.0.6) or higher installed on your machine.

Node.js (v18.13.0) Download

Yarn (v1.22.19) Download

Docker (v24.0.6) Download

Project Setup

  1. Clone the repository.
   git clone https://github.com/andre-ols/setup-node-typescript.git
   cd setup-node-typescript
  1. Install the dependencies.
   yarn install

Running the Application

Run in Development Mode

   yarn start:dev

This will start the Node.js server using TypeScript and Nodemon for automatic restarts during development.

Run in Production Mode

   yarn start:prod

This will start the Node.js server using the compiled JavaScript code.

Run with Docker in Development Mode

   yarn start:docker:dev

This will start the Node.js server using Docker and Nodemon for automatic restarts during development.

Run with Docker in Production Mode

   yarn start:docker:prod

This will start the Node.js server using Docker and the compiled JavaScript code.

Endpoints

GET /

Returns: Hello World!

License

This project is licensed under the MIT License - see the LICENSE file for details.