Code Monkey home page Code Monkey logo

next-laravel's Introduction

Next.js as the frontend application with a PHP Laravel server backend hosted on a Linux environment

Installation


  • Install PHP and Composer

sudo apt update && sudo apt upgrade
sudo apt install php php-cli php-xml php-curl composer
  • Install MySQL

sudo apt install mysql-server php-mysql
  • Install PostgreSQL

sudo apt install postgresql postgresql-contrib php-pgsql

Back-end


  • Clone the repository

git clone https://github.com/dot-ASH/next-laravel.git && cd next-laravel
  • Configure Environment
cp .env.example .env

edit the database config like this before setting up database

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password

for postgreSQL

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password

* needed only for postgreSQL database migration:-

php artisan migrate
  • Install composer packages

composer install && composer require laravel/breeze --dev && php artisan breeze:install api && php artisan key:generate
  • run the server
php artisan serve

Front-end


on a new terminal keeping PHP server on

  • Configure Environment
cd front-end && cp .env.example .env.local
  • Install dependencies and run

yarn && yarn dev

Check if the API is working @ http://localhost:3000/backendVersion

For more https://github.com/laravel/breeze-next

next-laravel's People

Contributors

dot-ash avatar

Stargazers

 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.