-
Before you install program service on your laptop, examine your environment and gather data to ensure an optimal installation experience. Review the details to ensure that the environment has the necessary resources and compliant target systems to successfully install and run Program Service.
-
Program service uses Postgres database to store and manage data. Refer programs.sql for the database and table structure.
-
Clone the project
- Fork the main source code repository
- Clone the forked repository and add main source code repository as upstream
git clone {SSH URL of FORKED REPOSITORY} cd {PROJECT-FOLDER} git remote add upstream [email protected]:Sunbird-Ed/program-service.git git fetch upstream git checkout -b {LOCAL-BRANCH-NAME} upstream/{LATEST BRANCH}
Note: Stable versions of the program service are available via tags for each release, and the master branch contains latest stable release. For latest stable release refer
-
Install Git Submodules to make use of https://github.com/project-sunbird/sunbird-js-utils.git
cd {PROJECT-FOLDER} git submodule init git submodule update
-
Install required dependencies
cd {PROJECT-FOLDER}/src npm install
-
Configuring the Environment
- Open the file
{PROJECT-FOLDER}/src/envVariables.js
in any available text editor and update the contents of the file so that it contains exactly the following values
const envVariables = { baseURL: process.env.dock_base_url || <'https://<host for adopter's instance'>, SUNBIRD_URL: process.env.sunbird_base_url || <'https://<host for adopter's instance'>, .... config: { user: process.env.sunbird_program_db_user || "<postgress user>", host: process.env.sunbird_program_db_host || "localhost", database: process.env.sunbird_program_db_name || 'sunbird_programs', password: process.env.sunbird_program_db_password || '<postgress password>', .... }, }
Once the file is updated with appropriate values, then you can proceed with running the application
- Open the file
- Run the following command in the {PROJECT-FOLDER}/src folder
node app.js
- The local HTTP server is launched at
http://localhost:6000