How to start projects in stacksavings

In stacksavings we have two projects: 1. WebReact 2. Webapi In this post we will talk about the simple steps to start both projects locally. Webapi This application is responsible for making the connection to the database and serving them in the form of api rest to a client application. Go to github and clone the webapi project Enter the folder webapi through the console or terminal of our system When we are inside the project folder, we execute the command: npm install Then at the root of the project, we created a new file called: .env In the content of this file we add the following content: DB_URI_DEV = mongodb: // user: 12345678 / nameBaseDownInDevelopment DB_URI_PROD = mongodb: // userProd: 12345678 / nameBaseDownInProduction The original urls must be requested in private to the administrator of the project, as well as the credentials of each database, which in most cases are included in the urls. 6. Finally execute the command or script: npm run start This will start the server locally, commonly at port 8080 Webreact Perform the client application role, obtaining the data in json format that the webapi application sends you. Go to github and clone the project webreact git clone Enter the folder webreact through the console or terminal of our operating system. Once located, we install the necessary packages: npm install Open the project in a text editor, and look for the file servicesApi.js , which will be found in the path: ** webreact / src / utils / servicesApi.js We modify the line number 2, changing the value to the property apiUrl of the object servicesApi , we assign the route or url where the webapi project is running, for example: export const servicesApi = { apiUrl: 'http: // localhost: 8080' } Finally, we start the server, executing the command: npm run dev This command will start the server on port 3000.