Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 3.58 KB

README.md

File metadata and controls

93 lines (63 loc) · 3.58 KB

Story Squad back end and API

Disclaimer: This is not a production version yet.

Requirements

Demo Videos

GoogleDrive

Contributors

M Groesbeck

API documentation

All routes can be viewed in the /documentation/APIDOCS.md file

DB documentation

Table info can be viewed in the /documentation/DBDOCS.md file

Tech Stack and Third-Party Services

Node.js + Express.js

  • Flexible and well-supported framework for back-end and API

PostgreSQL

  • Relational database for structured storage and retrieval of data
  • Supports JSON object storage for flexible architecture
  • Knex.js to build queries in JS back end

Okta

  • Third-party authentication and access management
  • Transparent for end user, but adds additional security for personal information
  • Account passwords are not saved to Story Squad database (not even account password hash)

Stripe

  • Third-party payment processing
  • Allows offline payment processing
  • Financial information is never saved to Story Squad database

Getting Started -- DEPRECATED

  • These setup steps were included in the project scaffold, but should no longer be necessary.

  • Install docker for your platform

  • Fork and clone the repo to install it as your own remote.

    • note please be sure to set your remote for this repo to point to your Labs Team Repository.

    • Alternatively you can clone this repo then remove the git folder to initialize a new repo

      > git clone --depth=1 --branch=master [email protected]:Lambda-School-Labs/labs-api-starter.git NEW-REPO-NAME
      > rm -rf ./NEW-REPO-NAME/.git
  • run: npm install to download all dependencies.

  • run: docker-compose up to start up the postgresql database.

  • 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 start to start your local development server.

Environment Variables for Dev/Testing

PORT=8000
PG_CONNECTION_STRING=postgres://docker:[email protected]:5400/api-dev
NODE_ENV="testing"
BASE_URL="https://localhost:8000"
SESSION_SECRET="another secret"

Okta, PostgreSQL, etc. environment variables should not be included in this readme or repo.

Contributing

ESLint and prettier

ESLint and prettier are already configured with Lambda Labs standards and ready to go. These must be ran from the CLI prior to commiting code in the following ways:

  • npm run lint to view all purposed fixes.
  • npm run lint:fix to apply fixes to eslint issues.
  • npm run format to apply the standards defined by eslint/prettier config.

Alternatively you can install plugins for your editor of choice.