This repository contains the source code for the Choirless project's web-based front end. It is a Node.js Express app designed to run under Cloud Foundry on the IBM Cloud.
The application server requires two services to operate correctly. You will need to create an IBM Cloud account in order to provision them.
Clone the repo:
git clone https://github.com/Choirless/Application-Server.git
cd Application-Server
Install the dependencies
npm install
Setup environment variables by editing a .env
file:
SESSION_SECRET=abc123
NODE_ENV=dev
CHOIRLESS_API_ENDPOINT=http://localhost:3000
CHOIRLESS_API_KEY=xyz987
COS_DEFAULT_BUCKET=mybucket
COS_ACCESS_KEY_SECRET=mysecret
COS_ACCESS_KEY_ID=myaccesskeyid
COS_ENDPOINT=my.cos.endpoint.com
COS_REGION=eu-geo
PORT=8000
Run the server
npm run start
You can now visit the Choirless website on http://localhost:8000
To view additional debug while running, start the application server with:
DEBUG=* npm run start
SESSION_SECRET
- data used to encrypt session cookie used during authentication.NODE_ENV
- if this is production
then the app runs in a more secure mode; insisting on https
, for instance.CHOIRLESS_API_ENDPOINT
- the URL of the Choirless API server e.g. http://localhost:3000
CHOIRLESS_API_KEY
- the API key used when communicating with the Choirless API server.COS_DEFAULT_BUCKET
- the name of the Cloud Object Storage bucket used to store video uploads.COS_ACCESS_KEY_SECRET
- HMAC credentials for accessing Cloud Object Storage.COS_ACCESS_KEY_ID
- HMAC credentials for accessing Cloud Object Storage.COS_ENDPOINT
- hostname of the Cloud Object Storage endpoints. PORT
- the HTTP port used to serve out the application. Default 3000.ic cf push