Skip to content

REST API built end-to-end from scratch using the latest innovations from .NET 5, Docker, Kubernets, Post and Visual Studio Code. The API will be written in C#.

License

Notifications You must be signed in to change notification settings

gabrielvieira1/Catalog.Api

Repository files navigation

Catalog API

REST API built end-to-end from scratch using the latest innovations from .NET 5, Docker, Kubernets, Azure, Post and Visual Studio Code. The API will be written in C#. The project was presented by Julio Casal in the video tutorial on FreeCodeCamp's Youtube channel https://www.youtube.com/watch?v=ZXdFisA_hOY

🚀 Technologies

This project was developed with the following technologies:

🔥 How to install

# Clone this repository
$ git clone https://github.com/gabrielvieira1/Catalog.Api.git

# Go into the repository folder and install dependencies
$ cd Catalog.Api

# Run
$ dotnet restore

# Go to the repository folder and build the docker file
$ cd Catalog.Api

$ docker build -t catalog:v1 .

# You need to be logged in to the docker
$ docker tag catalog:v1 yourUserDocker/catalog:v1

$ docker push yourUserDocker/catalog:v1

# Open the project with VScode, in the Catalog.Api project in the Kubernets folder edit the catalog.yaml file
# On line 16 in image change to yourUserDocker/catalog:v1
image: yourUserDocker/catalog:v1

# Go to the repository folder and create your secrets kubernets
$ cd kubernetes

$ kubectl create secret generic catalog-secrets --from-literal=mongodb-password='YourPassword'

# Run catalog.yaml and mongodb.yaml files
$ kubectl apply -f catalog.yaml

$ kubectl apply -f mongodb.yaml

# Check status of pods
$ kubectl get pods

# Your pods were more or less like this
NAME                                  READY   STATUS    RESTARTS   AGE
catalog-deployment-55c868ffdb-rmz8l   0/1     Running   0          28s
mongodb-statefulset-0                 1/1     Running   0          15s

# Now on Postman test the Api, for example:
GET - http://localhost:31111/items
POST - http://localhost:31111/items

🤔 How to contribute

  • Make a fork;
  • Clone the forked repository;
  • Create a branch with your feature: git checkout -b my-feature;
  • Commit changes: git commit -m 'feat: My new feature';
  • Make a push to your branch: git push -u origin my-feature;
  • Create a PR from your branch to my branch.

After merging your receipt request to done, you can delete a branch from yours.

📝 License

This project is under the MIT license. See the LICENSE for details.

Made with ♥ by Gabriel Vieira 👋 Get in touch!`

About

REST API built end-to-end from scratch using the latest innovations from .NET 5, Docker, Kubernets, Post and Visual Studio Code. The API will be written in C#.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published