This is a HPE-Developer-Community Hack Shack Workshops on Demand registration portal application.
To run the backend server API, follow the steps below:
You need to have node.js and a package manager; both npm (npm is installed with node.js) and yarn package manager.
- Node Download Page - The latest LTS version will have node.js, npm, and npx.
- Yarn Package Manager - Required.
- Install NPM modules
$ npm install or yarn install
- Configure environment
- Server:
- create a .env file using .env_example file
$ cd server
FROM_EMAIL_ADDRESS='' //email address to send email to registered customers
SENDGRID_API_KEY="" //sendgrid api key to send emails
PORT= // run the backed server at port
DB_PW= // postgreSQL db password - you can set as you wish
WORKSHOP_DURATION= // you can ignore
JUPYTER_EMAIL='' // email of JupyterHub server to prepare notebooks
FEEDBACK_URL= // survey link
PRODUCTION_API_SERVER='' // swagger documentation
JUPYTER_MOUGINS_LOCATION= // Mougins location name
JUPYTER_GRENOBLE_LOCATION= // grenoble location name
JUPYTER_GREENLAKE_LOCATION= // Greenlake location name
POSTFIX_EMAIL_GRENOBLE= // email of Postfix server in Grenoble to send email
POSTFIX_EMAIL_MOUGINS= // email of Postfix server in Mougins to send email
POSTFIX_EMAIL_GREENLAKE= // email of Postfix server in Greenlake to send email
POSTFIX_HOST_GRENOBLE= // Host of Postfix server in Grenoble to send email
POSTFIX_PORT_GRENOBLE= // Port of Postfix server in Grenoble to send email
POSTFIX_HOST_MOUGINS= // Host of Postfix server in Mougins to send email
POSTFIX_PORT_MOUGINS= // Port of Postfix server in Mougins to send email
POSTFIX_HOST_GREENLAKE= // Host of Postfix server in Greenlake to send email
POSTFIX_PORT_GREENLAKE= // Port of Postfix server in Greenlake to send email
FEEDBACK_URL= // Feedback URL
PRODUCTION_API_SERVER= // Production API Server hostname to access swagger doc
NO_OF_STUDENT_ACCOUNTS= // total number of student accounts for each location
SLACK_CHANNEL_WORKSHOPS_ON_DEMAND= // Slack channel ID for workshops on demand
SESSION_TYPE_WORKSHOPS_ON_DEMAND= // workshops on demand session type
SESSION_TYPE_CODING_CHALLENGE= // coding challenge session type
SLACK_CHANNEL_CHALLENGES= // Slack channel ID for challenges
- Run the PostgreSQL database using docker-compose
$ docker-compose up
- In a new terminal run the backend server:
$ npm start
- Seed the database
$ cd server
$ npm run seed-data
- Reset the database
$ cd server
$ npm run reset-data