Introduction
Welcome to this blog post where we'll walk you through the process of building a Node.js TypeScript project integrated with MongoDB and Docker. This project aims to help you get started with modern web development using these powerful technologies.
We'll cover the essentials, prerequisites, and the step-by-step process to set up and run your project. So, let's dive in!
Prerequisites
Before we begin, you need to ensure that you have the following dependencies installed on your system:
Getting Started
Let's kick things off by setting up the project on your local machine. Follow these steps:
- Clone the repository:
$ git clone --depth=1 https://github.com/rebazomar121/node-typescript-mongodb-starter your-project-name
- Navigate to the project directory:
$ cd your-project-name
- Install project dependencies:
$ npm install
- Configuration:
$ cp .env.example .env
- Run the project In Development:
$ npm run dev
- Run the project In Production:
$ npm run build && npm start
- Running with Docker:
$ docker build -t your-image-name .
- Run the container:
$ docker run -p 8080:8080 -d your-image-name
- Running with Docker Compose:
$ docker-compose up
Note: You can change the configurations in the .env file.
Top comments (2)
Exciting project! 👏 Combining the power of Node.js, TypeScript, Docker, and MongoDB sounds like a winning recipe
Thanks i will try to add Prisma for the project