Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 2.54 KB

README.md

File metadata and controls

75 lines (48 loc) · 2.54 KB

RESTful Web APIs

Build status GitHub

Boilerplate code for creating your next enterprise scale microservices-based application written in .Net Core Web APIs and MongoDB NoSQL database, with Docker containers support. Using best practices and industry standards.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Setup the Environment

Create a new file in the WebAPIs folder and name it .env to set the environment variables needed for the application to run.

TODO_MONGO_HOST=todo.db
TODO_MONGO_PORT=27017
TODO_MONGO_DB=TodoDatabase
TODO_MONGO_USER=TodoAPI
TODO_MONGO_PASS=Secret

MONGO_ROOT_USERNAME=root_username
MONGO_ROOT_PASSWORD=very_secure_password

DOCKER_REGISTRY=your_docker_hub_username

Run the Application

docker-compose up

Running the Tests

Unit Tests

dotnet test --logger trx

Integration Tests

docker-compose -f docker-compose.yml -f docker-compose.test.yml up --abort-on-container-exit

Deployment

After setting the environment variables on your production docker host run the following commands:

docker-compose pull --quiet
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --detach

Built With

  • .NET Core - The software framework used
  • MongoDB - NoSQL document-oriented database
  • NUnit - Unit testing framework for Microsoft .NET

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

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