Skip to content

Choirless/Application-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Choirless Application Server

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.

  • The Choirless API - a RESTful HTTP API that allows the application server to create & update choirs, songs and song parts.
  • IBM Cloud Object Storage - to store uploaded video content. Provision an IBM Cloud Object Storage service and generate HMAC-compatible credentials which the application server will pick up from environment variables.

Running locally

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

Debugging

To view additional debug while running, start the application server with:

DEBUG=* npm run start

Environment variables

  • 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.

Deploying to Cloud Foundry

  • Create a new Cloud Foundry application in the IBM Cloud Dashboard
  • Install the IBM Cloud CLI and follow the instructions to authenticate with your IBM Cloud credentials
  • Deploy this app with:
ic cf push

About

The front-end of the Choirless platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •