Coder Social home page Coder Social logo

wyz-r-main's Introduction

Getting started

Pre-requisites

  • docker
  • docker-compose

Check out this repository

Run composer to kickstart laravel sail

docker run --rm \
    --pull=always \
    -v "$(pwd)":/opt \
    -w /opt \
    laravelsail/php82-composer:latest \
    bash -c "composer install"

Run the application

cp .env.example .env

./vendor/bin/sail up -d

./vendor/bin/sail artisan key:generate

./vendor/bin/sail artisan migrate

Generate some test data

./vendor/bin/sail artisan db:seed --class=RecipesSeeder

Kickstart the nuxt frontend

./vendor/bin/sail npm install --prefix frontend

Run the frontend

./vendor/bin/sail npm run dev --prefix frontend

Confirm your application

visit the frontend http://localhost:3000

visit the backend http://localhost:8888

Testing the backend

Listing and search

// list all recipes
http://localhost:8888/api/recipes

// search by ingredients
http://localhost:8888/api/recipes/?search[ingredients][0]=Cod

// serach by email
http://localhost:8888/api/recipes?search[author_email][email protected]

// combined search
http://localhost:8888/api/recipes?search[author_email][email protected]&search[ingredients][0]=Sockeye

// fetching a specific recipe by slug
http://localhost:8888/api/recipes/qui-consequatur-itaque-hb2tu

Connecting to your database from localhost

docker exec -it laravel-mysql-1 bash -c "mysql -uroot -ppassword"

Or use any database GUI and connect to 127.0.0.1 port 3333

Other tips

./vendor/bin/sail down to bring down the stack

Sometimes it's necessary to restart the nuxt app when adding new routes. Simply ctrl+c on the npm command execute ./vendor/bin/sail npm run dev --prefix frontend again

wyz-r-main's People

Contributors

utroda avatar

Watchers

 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.