Giter Site home page Giter Site logo

laurabeatris / goeat-api Goto Github PK

View Code? Open in Web Editor NEW
54.0 3.0 12.0 26.55 MB

Rest API for a food delivery application - Built with Express, Postgres, Redis, MongoDB and Nodemailer

License: MIT License

JavaScript 96.61% Dockerfile 0.16% Shell 0.90% Handlebars 2.33%
nodejs express postgresql mongodb nodemailer mailgun food-delivery restaurants backend

goeat-api's Introduction

GoEat

Rest API for Food Delivery Businesses, providing fast and clean service for providers and users.

Author Languages Stars Forks Contributors

๐Ÿ“Œ Table of Contents

๐Ÿš€ Features

  • ๐Ÿฝ Schedule appointments in restaurants
  • ๐Ÿ›ต Request food orders
  • ๐Ÿ‘ฉโ€๐Ÿ’ผ Manage restaurants
  • ๐Ÿ“ Files upload
  • ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Provider and user interface

๐Ÿ‘ท Installation

You need to install Node.js and Yarn first, then in order to clone the project via HTTPS, run this command:

git clone https://github.com/LauraBeatris/goeat-api.git

SSH URLs provide access to a Git repository via SSH, a secure protocol. If you use a SSH key registered in your Github account, clone the project using this command:

git clone [email protected]:LauraBeatris/goeat-api.git

Install dependencies

yarn install

Create your enviroment variables based on the examples of .env.example

cp .env.example .env

After copying the examples, make sure to fill the variables with new values.

Setup a database

Install Postgres to create a database or if you have Docker in your machine, fill the environment values related to database configurations and then run the following commands in order to create a postgres container.

docker-compose up

Check if the containers are running

docker ps

๐Ÿƒ Getting Started

Run the transactions in order to configure all the database schemas

npx sequelize-cli db:migrate

Run the following command in order to start the application in a development environment:

yarn dev

Run the following command to run the queue responsable for the mail job

yarn queue-dev

Run in production

Run the following command in order to start the application in a production environment:

yarn start

Run the following command to run the queue responsable for the mail job

yarn queue

๐Ÿ“ฎ Faq

Question: What are the tecnologies used in this project?

Answer: The tecnologies used in this project are NodeJS + Express Framework to handle the server and Sequelize

Status Codes

Goeat returns the following status codes in its API:

Status Code Description
200 OK
422 UNPROCESSABLE ENTITY
400 BAD REQUEST
404 NOT FOUND
500 INTERNAL SERVER ERROR

๐Ÿ› Issues

Feel free to file a new issue with a respective title and description on the the GoEat API repository. If you already found a solution to your problem, i would love to review your pull request! Have a look at our contribution guidelines to find out about the coding standards.

๐ŸŽ‰ Contributing

Check out the contributing page to see the best places to file issues, start discussions and begin contributing.

๐Ÿ“• License

Released in 2020. This project is under the MIT license.

Made with love by Laura Beatris ๐Ÿ’œ๐Ÿš€

goeat-api's People

Contributors

dependabot[bot] avatar enzoalbornoz avatar laurabeatris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

goeat-api's Issues

Database Migration

I've been trying to migrate the tables into the database (PostgreSQL) right after cloning and yarn install using both typeorm and sequelize however when migrating with typeorm i get this
error Command "typeorm" not found.
and with sequelize using this command
npx sequelize db:migrate
i get this

Sequelize CLI [Node: 14.15.0, CLI: 5.5.1, ORM: 5.21.2]

Loaded configuration file "src\config\database.js".

After i installed typeorm and created the ormconfig.json as follows

{
    "type": "postgres",
    "host": "localhost",
    "port": 5432,
    "username": "postgres",
    "password": "",
    "database": "goeat"
 }

and rerun yarn typeorm migration:run with this response

yarn run v1.22.10
$ D:\Oness\code\PersonalProjects\goeat-api\node_modules\.bin\typeorm migration:run
Done in 3.44s.

but when i check my db, no tables were created

EDIT:

package version = 1.0.0
nodejs version = v14.15.0

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.