diff --git a/README.md b/README.md index 18de394..824bb70 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Thanks for checking out *Express Spices*, my from-the-ground-up e-commerce solution for buying spices! The product catalog for this store is modeled after [World Spice Merchants](https://www.worldspice.com/), sorted into categories by geographical regions. -Payment information is supported through the Stripe API, with session support and user management with Express Sessions. The backend features a full REST API built in Express, connects to a PostgreSQL database, and is documented with Swagger. The app features a frontend built with React, TypeScript, and Sass. +Payment information will be supported through the Stripe API, with session support and user management with Express Sessions. The backend features a full REST API built in Express, which connects to a PostgreSQL database, hosted with [Supabase](app.supabase.com). [Documentation for the API](https://mikayla-spice-market-api.herokuapp.com/api-docs) is provided with Swagger. The app features a frontend built with React, TypeScript, and Sass. ## Installing and Running the Development Build Locally 1. Clone the project repository from the root level. @@ -11,4 +11,8 @@ Payment information is supported through the Stripe API, with session support an 4. Change into the ``/client`` directory and run ``npm install`` to install frontend dependencies. 5. Still within ``/client``, run ``npm run dev`` to start the Vite development server. 6. In another terminal window at the root directory level, run ``npm start`` to start the localhost server. -7. It should indicate that the server is listening on its designated port, and log each database transaction to the console. \ No newline at end of file +7. It should indicate that the server is listening on its designated port, and log each database transaction to the console. + +## Accessing the Project and its REST API Online +1. The REST API for this project is exposed at https://mikayla-spice-market-api.herokuapp.com/ +2. The client site will be hosted on Netlify and is not online as of yet. \ No newline at end of file diff --git a/routes/auth.js b/routes/auth.js index 1434ce3..444627a 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -3,7 +3,7 @@ const AuthServiceInstance = new AuthService(); const router = require('express').Router(); module.exports = (app, passport) => { - app.use('/api/auth', router); + app.use('/auth', router); router.post('/register', async (req, res, next) => { try { diff --git a/routes/cart.js b/routes/cart.js index e995740..2ce967c 100644 --- a/routes/cart.js +++ b/routes/cart.js @@ -3,7 +3,7 @@ const CartService = require('../services/CartService'); const CartServiceInstance = new CartService(); module.exports = (app) => { - app.use('/api/cart', router); + app.use('/cart', router); // logic for global cart entries router.get('/', async (req, res, next) => { diff --git a/routes/category.js b/routes/category.js index ea9d98d..e55e09c 100644 --- a/routes/category.js +++ b/routes/category.js @@ -3,7 +3,7 @@ const CategoryService = require('../services/CategoryService'); const CategoryInstance = new CategoryService(); module.exports = (app) => { - app.use('/api/category', router); + app.use('/category', router); router.get('/', async (req, res, next) => { const { name } = req.query; diff --git a/routes/orders.js b/routes/orders.js index ca5f562..4532efe 100644 --- a/routes/orders.js +++ b/routes/orders.js @@ -1,7 +1,7 @@ const router = require('express').Router(); module.exports = (app) => { - app.use('/api/orders', router); + app.use('/orders', router); router.get('/', async (req, res, next) => { try { diff --git a/routes/product.js b/routes/product.js index 032ffd5..64a2a83 100644 --- a/routes/product.js +++ b/routes/product.js @@ -3,7 +3,7 @@ const ProductService = require('../services/ProductService'); const ProductServiceInstance = new ProductService(); module.exports = (app) => { - app.use('/api/product', router); + app.use('/product', router); router.get('/', async (req, res, next) => { const { name } = req.query; diff --git a/routes/regions.js b/routes/regions.js index 58e18d1..03469d6 100644 --- a/routes/regions.js +++ b/routes/regions.js @@ -3,7 +3,7 @@ const RegionsService = require('../services/RegionsService'); const RegionsInstance = new RegionsService(); module.exports = (app) => { - app.use('/api/regions', router); + app.use('/regions', router); router.get('/', async (req, res, next) => { const { name } = req.query; diff --git a/routes/user.js b/routes/user.js index 1d1d099..5d08d4a 100644 --- a/routes/user.js +++ b/routes/user.js @@ -4,7 +4,7 @@ const UserService = require('../services/UserService'); const UserServiceInstance = new UserService(); module.exports = (app) => { - app.use('/api/user', router); + app.use('/user', router); router.get('/:userId', async (req, res, next) => { try {