Skip to content

great-lakes/project-superior-api

Repository files navigation

Project Superior API JavaScript Style Guide

This is the API for the next iteration of the Hanna Bot geared towards engaging with students at hackathon events.

Features

  • Automatically issuing Azure codes
  • Mentor roster
  • Project Tracking
  • Student Inquiry Tracking

Set up

1. Setting up a local database

  1. Download and Install Postgres 9.6 (Pick version 9.6.x, and Windows)
  2. During the installation process, fill out the admin user and password. (Password doesn't have to be fancy, since this is just living in your local computer)
  3. Download and Install OmniDB
  4. Open OmniDB and click on connections
  5. Enter the following configuration: Technology: postgresql, Server: localhost, Port: 5432, Database: postgres, User: (Your admin username), Title: local-db
  6. click on the little Plug icon to test the connection. You might need to input your password at this point.
  7. When you are in, you will need to create a database.
  8. expand your PostgresSQL, and you will see a Databases item. Right click on it and select "Create Database"
  9. A tab will be created on the right panel. Change name in the SQL to a name for your database

2. Connecting to and populating the local database

  1. clone this repo
  2. run npm install
  3. duplicate .env.example to .env
  4. fill the DB_CONNECTION_STRING out, replacing each portion of the string with the right information
  5. run npm run migrate:latest
  6. run npm run seed:run

3. Using GraphiQL Client

  1. In your .env file, set a random value for GRAPHQL_ACCESS_TOKEN. Again, doesn't have to be fancy, but that's your key for the graphiql client
  2. Run node server
  3. Go to https://localhost:3000/graphiql?access_token=YOUR_ACCESS_TOKEN to test the GraphQL API

About

Student Hackathon GraphQL and Websocket server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published