Skip to content

Easily set up a local development environment for Node.js projects using Docker containers.

License

Notifications You must be signed in to change notification settings

saadfrhan/docker-nodejs-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Node.js Example

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository:
git clone https://github.com/saadfrhan/docker-nodejs-example.git
  1. Navigate to the project directory:
cd docker-nodejs-example
  1. Install dependencies:
pnpm install
  1. Build the TypeScript code:
pnpm build
  1. Run the application:
docker build -t my-node-app .
docker run my-node-app

Project Structure

The project directory structure is as follows:

├── dist/             # Compiled JavaScript files (generated by TypeScript)
├── node_modules/     # Dependencies (generated by PNPM)
├── src/              # Source files written in TypeScript
│   └── index.ts      # Entry point of the application
├── .dockerignore     # Files and directories to be ignored by Docker
├── .gitignore        # Files and directories to be ignored by Git
├── Dockerfile        # Dockerfile for building Docker image
├── package.json      # Project metadata and dependencies
├── pnpm-lock.yaml    # PNPM lock file
├── README.md         # Project documentation
└── tsconfig.json     # TypeScript configuration file

Contributing

If you find a bug or have an idea for a new feature, feel free to submit a pull request.

About

Easily set up a local development environment for Node.js projects using Docker containers.

Topics

Resources

License

Stars

Watchers

Forks