Backend server that loads data from multiple services
- NodeJS and NPM
- Google Sheets API credentials. If you do not have one, please follow this tutorial
-
Clone the repo
git clone https://github.com/cip-core-mirrors/byor-service.git
-
Install NPM packages
npm install
-
Provide these information in environment variables :
Name Description Default value GOOGLE_CLIENT_EMAILEmail of the Google account used GOOGLE_PRIVATE_KEYPrivate key of the Google account used PORTPort the server listens to 3000 POSTGRESQL_HOSTPostgreSQL server host POSTGRESQL_PORTPostgreSQL server port POSTGRESQL_DATABASEPostgreSQL database POSTGRESQL_USERPostgreSQL user POSTGRESQL_PASSWORDPostgreSQL user password
If Google-related environment variables are not provided, the /spreadsheet endpoint will not be available.
npm run startThe server will be launched and will listen at port 3000 by default (see http://localhost:3000)
Please note that the server can only access to Spreadsheets that it has access to (ie. shared access or public)