Coder Social home page Coder Social logo

cuisine-server's Introduction

Cuisine server

An api server to store recipes and ingredients.

Prerequisites

Docker

Setup

Create a new configuration file off of the sample one:

cp env-sample .env (make optional edits)

Run

docker-compose up

API Endpoints

Once the server is running, the API is available at http://localhost:8080 (by default, can be changed by editing .env)

GET /recipes: Get all recipes

POST /recipes: Create a recipe

GET /recipes/:id: Get a recipe

PUT /recipes/:id: Update a recipe entirely

PATCH /recipes/:id: Update a recipe partially

DELETE /recipes/:id: Delete a recipe

Request payloads must be of type JSON.

See ./tests/integration/recipe.test.js for examples.

Develop

Use any editor compatible with devcontainers. Ideally Microsoft Visual Studio Code or Github Code Spaces.

Github's Code Spaces are also a great way to test out and contribute to this project!

If you don't want to use neither, you should be able to start docker-compose with ./devcontainer/docker-compose.yml as configuration file, like so: docker-compose --project-name server -f docker-compose.yml -f .devcontainer/docker-compose.yml up --build.

You'll be missing yarn which is used for managing packages which can be added by running apk add --no-cache yarn; yarn in a terminal in the server container.

Test

yarn test for one time tests run, yarn test:watch for continuous tests running (watches file changes).

cuisine-server's People

Contributors

amessinger avatar

Watchers

 avatar  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.