Git Product home page Git Product logo

project-amethyst's Introduction

development environment setup guide

Prerequisites

How to run

  • clone or download repository git clone https://github.com/MHekert/Project-Amethyst
  • change directory to cloned/downloaded one cd /path/to/project/directory
  • create node.env file (go to example)
  • change branch to development: git checkout development
  • install dependencies yarn install
  • start MongoDB - linux: sudo mongod - windows: follow installation guide
  • run application yarn start

node.env

example

NODE_ENV=development
SESSION_SECRET=keybordCat
MONGODB_URI_TEST=mongodb://localhost:27017/testDB
MONGODB_URI=mongodb://localhost:27017/localDB
PORT=8080
FRONTEND_URL=http://localhost:3000
FACEBOOK_APP_ID=your_app_id
FACEBOOK_APP_SECRET=your_secret
FACEBOOK_CALLBACK_URL=http://localhost:8080/auth/facebook/callback
FIREBASE_IMGS_URL=https://firebasestorage.googleapis.com/v0/b/YOUR_PROJECT_ID.appspot.com/o/DIRECTORY%2F
FIREBASE_SAK_TYPE=...
FIREBASE_SAK_PROJECT_ID=...
FIREBASE_SAK_PRIVATE_KEY_ID=...
FIREBASE_SAK_PRIVATE_KEY="..."
FIREBASE_SAK_CLIENT_EMAIL=...
FIREBASE_SAK_CLIENT_ID=...
FIREBASE_SAK_AUTH_URI=...
FIREBASE_SAK_TOKEN_URI=...
FIREBASE_SAK_AUTH_PROVIDER_X509_CERT_URL=...
FIREBASE_SAK_CLIENT_X509_CERT_URL=...

node.env pitfalls

  • NODE_ENV - optional, default value: development. Read more
  • FIREBASE_IMGS_URL=https://firebasestorage.googleapis.com/v0/b/YOUR_PROJECT_ID.appspot.com/o/DIRECTORY%2F
    • Replace YOUR_PROJECT_ID with your project id (can be find in serviceAccountKey.json)
    • Replace DIRECTORY%2F with your path to directory in which files should be saved. Path needs to be url encoded (eg. %2F insteed of /)
  • value of every key that starts with FIREBASE_SAK_ can be found in serviceAccountKey.json - accessible from firebase console
  • value of every key that starts with FACEBOOK_ can be found on app's page at developer.facebook.com
  • FIREBASE_SAK_PRIVATE_KEY's value needs to be double quoted

useful scripts

  • transpile typescript to javascript yarn build
  • transpile typescript and start application yarn start
  • transpile typescript and run tests yarn test
  • run tests without typescript transpilation yarn justTest
  • run application without typescript transpilation yarn justStart
  • transpile, run tests and run application after changes to any .ts, .json or .env file yarn watch
  • insert pseudo random mock data to database yarn populateDatabase

project-amethyst's People

Contributors

mhekert avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.