To get started with this project, follow these steps:
- Clone the repository:
git clone https://github.com/saadfrhan/docker-nodejs-example.git
- Navigate to the project directory:
cd docker-nodejs-example
- Install dependencies:
pnpm install
- Build the TypeScript code:
pnpm build
- Run the application:
docker build -t my-node-app .
docker run my-node-app
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
If you find a bug or have an idea for a new feature, feel free to submit a pull request.