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

upframe/api

Folders and files

NameName
Last commit message
Last commit date
Dec 23, 2019
Dec 16, 2019
Jan 13, 2020
Jan 13, 2020
Dec 22, 2019
Nov 5, 2019
Nov 10, 2019
Feb 3, 2019
Dec 8, 2018
Apr 10, 2019
Jan 13, 2020
Dec 31, 2018
Sep 13, 2018
Jan 13, 2020
Oct 24, 2019
Dec 22, 2019
Dec 16, 2019
Mar 13, 2020

Repository files navigation

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