GithubHelp home page GithubHelp logo

dycodes / jaguars-food-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hngx-org/jaguars-food-backend

0.0 0.0 0.0 554 KB

Home Page: https://jaguars-food-backend.vercel.app

JavaScript 100.00%

jaguars-food-backend's Introduction

Food App API(Team Jaguar)

Introduction

Free Lunch App

Collaborators

File Structure

  • Route: Where path of API endpoints are declared and assigned to controllers.

  • Controllers: Controllers will be responsible to handle all the incoming requests to your application which will either render a page in response, may send a JSON payload or will handle other critical API related actions like POST, PUT, DELETE.

  • Config: Keeps all the configs needed for the application. For example, if the app connects to a database, the config for the database can be put in a file like db.config.js

  • Index File: This is the root file

NOTE

  • Only The team lead is allowed to push commits directly to the master branch.

  • [HNG-Inters] To contribute to this repo, Branch off master branch using the below naming convention:

    • [slack-username]-[feature]:

    For example: Tayo Akosile working on the sign-up feature:

    git checkout -b tayoakosile-signup

Environment Variables

To run this project, you will need to:

  • Create a .env file in the root directory

  • Add the following environment variables to your .env file

    • -PORT

Setting Up Sequelize and MySQL Locally

This guide provides step-by-step instructions to set up Sequelize, a Node.js ORM, and MySQL on your local machine (Windows/Mac). These steps will allow you to connect to a MySQL database and run provided code seamlessly.

Prerequisites

1. Installing MySQL Server

Windows

  1. Download the MySQL Installer for Windows = require( the official MySQL website.
  2. Run the downloaded installer and follow the on-screen instructions to install MySQL.
  3. During installation, you will be prompted to set a root password. Make sure to remember this password, as you will need it later.

Mac

  1. Download the MySQL Community Server DMG for macOS = require( the official MySQL website.
  2. Run the downloaded DMG file and follow the on-screen instructions to install MySQL.
  3. During installation, you will be prompted to set a root password. Make sure to remember this password, as you will need it later.

2. Starting the MySQL Server

Windows

  • Open MySQL Workbench or use the MySQL command-line client to start the server.

Mac

  • Open a terminal and start the MySQL server using the following command:
    sudo mysql.server start

Run Locally

Clone the project

  git clone https://github.com/hngx-org/jaguars-food-backend

Go to the project directory

  cd jaguars-food-backend

Install dependencies

npm install

Start the dev server

npm run dev

Troubleshooting

  • If you encounter any issues during setup or code execution, refer to the MySQL and Sequelize documentation or seek assistance = require( the team.

Tech Stack

  • NodeJS This is a cross-platform runtime environment built on Chrome's V8 JavaScript engine used in running JavaScript codes on the server. It allows for installation and managing of dependencies and communication with databases.
  • ExpressJS This is a NodeJS web application framework.
  • Sequelite ORM This is a promise-based Node.js ORM tool for Postgres.
  • joi Schema description language and data validator
  • mysql2 MySQL2 is the MySQL connector library used by Sequelize to connect to the MySQL db server.

jaguars-food-backend's People

Contributors

oluemm avatar tayoakosile avatar nireayoo avatar ireoluwacodes avatar cyrus-11 avatar favour-22 avatar chisomchris avatar boluwatife010 avatar kalwhyte avatar devcosmas avatar davidumoru avatar 26thavenue avatar midegiwa avatar ipiea avatar joshua-jj avatar sam-shot avatar marrwan avatar abdussalam-mujeeb-ur-rahman avatar afomachinenye avatar mhykelb avatar whytewalker avatar thegodhope avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.