This is the service that manages the information of Opus.
Would you like to collaborate? Here are the steps to follow to get down to work.
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.
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
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:
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.
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.
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 thedocker-compose.yml
file.
After this, the project should start in a few seconds.
You can view the resources of the service by accessing: http://localhost:5000/swagger.
- Node.js
- Nest.js Framework
- Docker
- Postgres
The information exposed through this service comes from the local database.