The Artlist API is a RESTful API that uses 5 endpoints to serve basic CRUD opperations for the Artlist Client App (link below) It stores data in a Heroku hosted PostgreSQL database called "artlist-api"
- Click Here to interact with the live API
- Click Here to view the live Client in the browser.
- Click Here for the API repo
- Click Here for the Client repo
-
returns an array of JSON objects representing items in the "list" table
- adds a new item to the "list" table list items have the following columns:
-
returns an item with the id that matches item-id
-
edits an item with the id that matches item-id (requires one of the following values: title, description, medium, location, price, size, availability)
-
deletes an item with the id that matches item-id
- Start the application
npm start - Start nodemon for the application
npm run dev - Run the tests
npm test - Migrate
npm run migrate - Migrate Test
npm run migrate:test
Seeding databases
- Seed artlist
psql -U dunder_mifflin -d artlist -f ./seeds/seed.artlist.sql - Seed artlist-test
psql -U dunder_mifflin -d artlist-test -f ./seeds/seed.artlist.sql
Add a new Heroku application with heroku create. This will make a new git remote called "heroku" and you can then npm run deploy which will push to this remote's master branch.
The RESTful API is hosted on Heroku and was written in Javascript ES6 using Node.js with Express as a framework. I used Mocha and Chai to test. The database uses PostgreSQL and is also hosted on Heroku.
The client side app hosted on Zeit and is written in:
- HTML5
- CSS3
- Javascript ES6
- JSX. I used React as a framework and Jest for testing.