nodejs-repository-pattern-and-ioc
WIP: π This is a boilerplate for Node.JS, Express.JS, and MongoDB based web application that takes advantage of repository pattern and dependency injection.
File Explorer
Download Latest Version (.zip)- devcontainer.json
- docker-compose.yml
- Dockerfile
- FUNDING.yml
- index.html
- app.errors.ts
- base.controller.ts
- constants.ts
- test.helper.ts
- asyncWrapper.ts
- database.ts
- error.handler.ts
- inversify.ts
- logger.ts
- repository.ts
- user.controller.ts
- user.dto.ts
- user.repository.ts
- user.service.interface.ts
- user.service.ts
- users.test.ts
- app.ts
- router.ts
- types.ts
- .dockerignore
- .editorconfig
- .env-example
- .eslintignore
- .eslintrc.js
- .gitignore
- .prettierrc
- _config.yml
- azure-pipelines.yml
- Dockerfile
- jest.config.js
- LICENSE
- package.json
- pnpm-lock.yaml
- README.md
- tsconfig.json
# Installation Guide
1. Get the code
git clone https://github.com/shihabmridha/nodejs-repository-pattern-and-ioc
Downloads the entire project code from GitHub to your computer.
cd nodejs-repository-pattern-and-ioc
Moves into the project folder you just downloaded.
2. Docker
Easy RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build -t nodejs-repository-pattern-and-ioc .
Builds a runnable image based on the Dockerfile.
docker run -p 8080:80 nodejs-repository-pattern-and-ioc
Runs the built image as an actual container.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
3. Node.js
EasyPrerequisites
npm install
Downloads and installs the libraries listed in package.json.
npm start
Starts the development/run server.
After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.
// repository documentation
Was this content helpful?
(0 ratings)
