Skip to content

Project using Kubernetes that presents a simple API in Node.js with Postgres to insert, search, update and delete heroes.

License

Notifications You must be signed in to change notification settings

diegomais/heroes

Repository files navigation

Heroes
Heroes: Node.js with Postgres Example 🦸

GitHub language count GitHub top language GitHub license GitHub last commit

Technologies   |    Project   |    Getting started   |    How to contribute   |    License


Mobile and web

🚀 Technologies

This project was developed with the following technologies:

Extras:

💻 Project

Project using Kubernetes that presents a simple API in Node.js with Postgres to insert, search, update and delete heroes.

💺 Getting started

These instructions will get you a copy of the full project up and running on your local machine for development and testing purposes.

Setting up the development environment

The project is developed using Git. Git is a free and open source distributed version control system. Download Git.

Cloning the project

You can obtain the project by running the instruction bellow on your terminal:

git clone https://github.com/diegomais/heroes.git

Local machine

Requirements

The project can be built with npm or Yarn, so choose one of the approach bellow in case you don't have any installed on your system.

  • npm is distributed with Node.js which means that when you download Node.js, you automatically get npm installed on your computer. Download Node.js.
  • Yarn is a package manager built by Facebook Team and seems to be faster than npm in general. Download Yarn.

Installing dependencies and running the server

Run the instructions bellow inside heroes directory:

  1. npm install
  2. npm start

or

  1. yarn install
  2. yarn start

Docker Compose

Requirements

  • Docker is an open-source project for automating the deployment of applications as portable, self-sufficient containers that can run on the cloud or on-premises. Download Docker Desktop.
  • Docker Compose is a tool for defining and running multi-container Docker applications. Download Docker Compose.

Building containers and running the server

Run the instructions bellow inside heroes directory:

docker-compose up

Kubernetes

Requirements

  • Docker is an open-source project for automating the deployment of applications as portable, self-sufficient containers that can run on the cloud or on-premises. Download Docker Desktop.
  • minikube quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. Install minikuke.

Start your cluster

From a terminal with administrator access (but not logged in as root), run:

minikube start

Deploy application

Run the instructions bellow inside heroes directory:

kubectl apply -f k8s/.

Swagger

Swagger documentation available at http://localhost:3333/documentation.

🤔 How to contribute

  • Fork this repository;
  • Create a branch with your feature: git checkout -b my-feature;
  • Commit your changes: git commit -m '[feat](scope) My new feature';
  • Push to your branch: git push origin my-feature.

After the merge of your pull request is done, you can delete your branch.

📝 License

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


Made with ❤️ by Diego Mais 👋.

About

Project using Kubernetes that presents a simple API in Node.js with Postgres to insert, search, update and delete heroes.

Resources

License

Stars

Watchers

Forks