Skip to content

Find a coding bootcamp that's right for you. Back End for a portfolio project built with Node, Express, Knex, PostgreSQL, Mocha, Chai

Notifications You must be signed in to change notification settings

amgauthier1992/codecampfinder-api

Repository files navigation

CodeCampFinder API

Find a coding bootcamp that's right for you. Search for coding bootcamps and their associated course offerings based on your location and individualized criteria.

This is the backend for the CodeCampFinder client. A live version of the app can be found at https://codecampfinder.vercel.app/

The front end client can be found at https://github.com/amgauthier1992/codecampfinder.

Introduction

With coding bootcamps on the rise as a potential alternative to break into tech, and with so many options for prospective students looking to delve into an exciting new career, it's hard to decide which institution aligns best with your values and will actually help you achieve your goals. This application was designed to serve as a tool to assist and streamline the process of exploring some of the nation's most popular coding bootcamps and their available courses.

Disclaimer - Information regarding bootcamps and courses, especially information surrounding financing and tuition figures are constantly fluid and changing. We try our best to keep all of this information up-to-date, but for the most accurate information, you will want to visit a bootcamp's website via the app directly.

Future Developments

  • Implement a portal specific to bootcamp administrators that allows them to update pertinent information for their bootcamp and individual course offerings.
  • Allow admins to add new courses to their bootcamps course catalog.

Technology

Back End

  • Node and Express
    • Authentication via JWT
    • RESTful API
  • Testing
    • Supertest (integration)
    • Mocha and Chai (unit)
  • Database
    • Postgres
    • Knex.js - SQL query builder

Production

Deployed via Heroku

Set up

Major dependencies for this repo include Postgres and Node.

To get setup locally, do the following:

  1. Clone this repository to your machine, cd into the directory and run npm install

  2. Create the dev and test databases: createdb -U <role> -d codecampfinder and createdb -U <role> -d codecampfinder-test

  3. Create a .env and a .env.test file in the project root

Inside these files you'll need the following:

NODE_ENV=development
PORT=8000

DATABASE_URL='postgresql://<role>@localhost/codecampfinder'
TEST_DATABASE_URL='postgresql://<role>@localhost/codecampfinder-test'

JWT_SECRET=<your-secret-here>

Your .env.test will be the same except your DATABASE_URL will be the value from TEST_DB_URL above. Alternatively, you can also just create one .env file and change the connection property on the db/knex object in your server.js file like so:

const db = knex({
  client: 'pg',
  connection: TEST_DATABASE_URL,
  //connection: DATABASE_URL,
});
  1. Run the migrations for dev - npm run migrate
  2. Run the migrations for test - env NODE_ENV=test npm run migrate
  3. Seed the database for test using the provided batch file. To seed for dev, replace codecampfinder-test with codecampfinder at the end of each seed script.
  • Navigate to seeds/run-seeds.bat in the project directory.
  • Shift + Alt + R (Reveal in File explorer)
  • Navigate one directory down to seed folder in File explorer
  • Erase all content in address bar, Type in cmd to open Windows cmd prompt, Hit enter.
  • Type in run-seeds.bat / Hit enter
  1. Run the tests - npm t
  2. Start the server - npm run dev

About

Find a coding bootcamp that's right for you. Back End for a portfolio project built with Node, Express, Knex, PostgreSQL, Mocha, Chai

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published