Skip to content

Latest commit

 

History

History
134 lines (84 loc) · 4.21 KB

README.en.md

File metadata and controls

134 lines (84 loc) · 4.21 KB

Opus API

Table of Contents

Description and context

This is the service that manages the information of Opus.

Service reference

Requirements

How to start

Would you like to collaborate? Here are the steps to follow to get down to work.

Dependencies

Preparation of development environment

To start with the development it is necessary to make some configurations before to maintain the project standard.

As you may have seen before, Visual Studio Code is the main text editor used in this project, however, feel free to use any editor or IDE of your choice.

Clone the project

You can clone the project in any directory of your choice, but we recommend creating an opus directory on the home of your operating system.

mkdir ~/opus
git clone https://github.com/Streamelopers/opus-api.git

In case you have correctly set the environment variable of the Visual Studio Code executable, you can choose to open the project with the following command:

code opus-api

Installing extensions

If you do not use Visual Studio Code, skip this step.

It is very likely that when you open the project for the first time in Visual Studio Code you will be shown an alert like the following: Extension installation recommendation

This makes it easy to install extensions that will facilitate development during your collaboration with this project.

In case the installation recommendation alert is not displayed, you can get to install these dependencies manually. You can take a look at the .vscode/extensions.json file.

Creation of environment variables file

The litmus test to know if an application has all its configuration correctly separated from the code is to verify that the base code can be converted to open source at any time, without compromising the credentials. For this reason, we must create our environment variable file .env. For this, we execute the following command:

cp .env.example .env

Feel free to change the credentials to your liking.

Run the project

To facilitate the start of your collaboration and avoid dependency problems, the project implements docker-compose.

Feel free to run the project without using Docker, but it is important to know that you will not be able to count on the support of the community. If you don't know Docker, you can quickly learn the basics here.

We navigate to the directory where the project is located:

cd ~/opus/opus-api

We execute the following command through npm:

npm run start:docker

This script executes the following docker-compose up command which in turn feeds from the docker-compose.yml file.

After this, the project should start in a few seconds.

Resource definition

You can view the resources of the service by accessing: http://localhost:5000/swagger.

Development stack

Server

  • Node.js
    • Nest.js Framework
  • Docker

Database

  • Postgres

Disclaimer

The information exposed through this service comes from the local database.

Contributors