A Node.js Express web api used for Pisspricer. The api is currently deployed at api.pisspricer.co.nz.
- Node.js
- npm
- Clone the repository.
git clone https://github.com/TooMuch4U/pisspricer-api
- Install npm dependencies.
# Change into the src directory cd api # Install npm dependencies npm install
- Set the following environment variables.
MYSQL_HOST= MYSQL_USER= MYSQL_PASSWORD= MYSQL_DATABASE= MYSQL_PORT= IMAGE_BUCKET= BUCKET_KEY_PATH= OPEN_PORT= EMAIL_HOST= EMAIL_USER= EMAIL_PASSWORD= EMAIL_ADDRESS= CLOUD_SQL_CONNECTION_NAME= //see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard
To enable https aswell as http...
- Set an
OPEN_PORT_HTTPS
environment variable to the desired https port. - Place the ssl certificate named
cert.pem
and the key namedkey.pem
in the directory (/api).
Start the api server with
npm start
A testing environment can be set up as described in the corresponding README files in
/testing-env
.