Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 3.26 KB

README.md

File metadata and controls

71 lines (51 loc) · 3.26 KB

Labs26-Apollo-Team-C Backend

Welcome to the Apollo Backend Repository.

Apollo Product its a software product tool to help leadership guide the vision and delivery of the team. Most software team management software focuses on task management instead of vision alignment. Apollo is focused on leading with vision, and supporting a team by unblocking them rather than by managing flow of tasks.

The survey asks the leader a series of questions, and then shares the response with the team and asks them to answer a new series of questions in response to the leader's post.

Links

Deployment: https://apollo-c-api.herokuapp.com/

Documentation: https://apollo-c-api.herokuapp.com/api-docs

Requirements

Labs teams must follow all Labs Engineering Standards.

Getting Started

Enviornment Variables

  • PORT - API port (optional, but helpful with FE running as well)
    • The following ports are whitelisted for use with okta
      • 3000
      • 8000
      • 8080
  • DATABASE_URL - connection string for postgres database
  • OKTA_URL_ISSUER - The complete issuer URL for verifying okta access tokens. https://example.okta.com/oauth2/default
  • OKTA_CLIENT_ID - the okta client ID.

See .env.sample for example values

Setup postgres

There are 3 options to get postgresql installed locally [Choose one]:

  1. Use docker. Install for your platform
    • run: docker-compose up -d to start up the postgresql database and pgadmin.
    • Open a browser to pgadmin and you should see the Dev server already defined.
    • If you need to start over you will need to delete the folder $ rm -rf ./data/pg as this is where all of the server data is stored.
      • if the database api-dev was not created then start over.
  2. Download and install postgresql directly from the main site
    • make note of the port, username and password you use to setup the database.
    • Connect your client to the server manually using the values previously mentioned
    • You will need to create a database manually using a client.
    • Make sure to update the DATABASE_URL connection string with the values for username/password, databasename and server port (if not 5432).
  3. Setup a free account at ElephantSQL
    • Sign up for a free Tiney Turtle plan
    • copy the URL to the DATABASE_URL .env variable
    • make sure to add ?ssl=true to the end of this url

Setup the application

  • create your project repo by forking or using this as a template.
  • run: npm install to download all dependencies.
  • run: cp .env.sample .env and update the environment variables to match your local setup.
  • run: npm run knex migrate:latest to create the starting schema.
  • run: npm run knex seed:run to populate your db with some data.
  • run: npm run tests to confirm all is setup and tests pass.
  • run: npm run watch:dev to start nodemon in local dev environment.

Make sure to update the details of the app name, description and version in the package.json and config/jsdoc.js files.

Contributing

See the contributing doc for more info.