Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

Latest commit

History

History
71 lines (40 loc) 路 1.89 KB

README.md

File metadata and controls

71 lines (40 loc) 路 1.89 KB

Build Status Codacy Badge

馃敟 Api

The API for our platform and services. Achieved with Node.js.

Installation

Quick and easy install thanks to Yarn

git clone https://github.com/upframe/api.git
cd api
yarn install

All the dependencies are now installed. Let's take care of the following environment variables. There are two ways get them working:

  • Option 1 is to get a copy of our .env file, a secret file with all the environment variables we use in production (for Upframe developers only). We take this file and add it to the root folder.

  • Option 2 is to manually set them up. We prefer the first option but the second one also works. Here is a list of said environment variables and what their use is.

NODE_ENV - "development" or anything else. Controls our CORS policy to allow localhost.

REGISTER - Temporary. When it's a number it opens our registration endpoint.

DB_HOST - A MySQL database URL to connect to.

DB_USER - MySQL database username.

DB_PASSWORD - MySQL database password.

DB_NAME - MySQL database name.

CONNECT_PK - Private key to perform encryption.

MG_APIKEY - Mailgun API key.

MG_DOMAIN - Mailgun domain.

IAM_USER_KEY - AWS IAM user key with access to S3.

IAM_USER_SECRET - AWS IAM secret with access to S3.

BUCKET_NAME - AWS S3 bucket name.

CLIENT_ID - Google API ID.

CLIENT_SECRET - Google API Secret.

GOOGLE_CALLBACK_URL - Google API OAuth Callback URL.

Running

Development

yarn dev

Production

yarn prod

License

GPL 漏 Upframe