Skip to content

Rod-Freedom/C13-Vespucci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vespucci

Trading is the name of the game.

License



ABOUT THE PROJECT

Overview

The Vespucci API is designed to streamline and enhance e-commerce operations with a robust suite of tools. Whether you're building a new online store or integrating with an existing platform, Vespucci offers comprehensive functionalities to support various trading needs.

Find the repo here.
Watch our tutorial here.



Table of Contents


(Back to the Top)

Resources

  • For JavaScript
    • ES6 modules.
    • Promises.
    • Extensive object and array destructuring.
    • Polymorphism for methods.
    • Classes and constructors.
    • Extended classes.
    • async and await executions.
    • try & catch executions.
    • Structured error handling to prevent unexpected crashes.
    • console.table() to display SQL tables.
  • For Sequelize
    • Models.
    • Models.create()
    • Models.destroy()
    • Models.update()
    • Models.findAll()
    • Models.findByPk()
    • Models.hasOne()
    • Models.hasMany()
    • Models.belongsTo()
    • onDelete, foreignKey, autoIncrement, etc.
    • Hooks
  • For Express.js
    • app.post()
    • app.get()
    • app.put()
    • app.delete()
    • app.Router()
    • app.use()
  • For Node.js
    • NPM packages
      • PG
      • Dotenv
      • Express.js
      • Sequelize
    • process.env variables.
  • For SQL
    • CREATE
    • SELECT
    • UPDATE
    • DELETE
    • AS for column and table aliases
    • JOIN LEFT, INTO, RIGHT, etc. to join even to the same table.
    • INSERT INTO
    • FROM, ON & WHERE
    • sum() & count()
    • GROUP BY & ORDER BY

(Back to the Top)

Get Started

Watch our tutorial here.


IMPORTANT | Vespucci isn't online yet, so you'll have to run it locally.


Once you have the repo on your computer after running git clone, open your command line. Make sure to open the Vespucci repo folder in your terminal. Use npm i to install all the modules needed to run Vespucci.

First clone:

$ git clone https://github.com/Rod-Freedom/C13-Vespucci.git

Then install the modules:

$ npm i

Then create the DB by opening PostgreSQL in your terminal and running the schema file:

postgres= \i db/schema.sql

Finally, exit postgres and run the seeds, and you're ready to go.

$ npm run seed

IMPORTANT | You need to have PostgreSQL installed in your computer to run Vespucci!


(Back to the Top)

Usage

Watch our tutorial here.


IMPORTANT | Vespucci isn't online yet, so you'll have to run it locally.


Vespucci works as any RESTful API. To run it locally, open the Vespucci folder in your terminal, then type node server.js or npm start and hit enter.

$ npm start

You have GET, POST, PUT and DELETE methods for each route. The available routes for /api, are:

  • /tag
  • /categories
  • /products

When doing a PUT or DELETE, you'll have to add the ID parameter route (/id) to target a specific product, tag or category. You may also do it with GET.



(Back to the Top)

License

GitHub
See the license for more details.


(Back to the Top)

Contribute

If you have suggestions or want to help with some improvements, you can write me by email.


(Back to the Top)

Credits

The code was created by Rod's Freedom from some initial edX BootCamp code.


(Back to the Top)

About

Trading is the name of the game. Go to the tutorial here ⬇️

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors