Giter Club home page Giter Club logo

monosparta-diving-server's Introduction

Dive In Taiwan - Server

This is a project in a trainee program of Mono-Sparta. It's an APP about diving. The project is basded on Laravel Framework 5.8.28

Installation

Windows

  1. Install VirtualBox

  2. Install Vagrant

  3. Install homestead
    All of requirements are in this virtual machine.

    $ vagrant box add laravel/homestead

  4. Install Composer
    It's a package for PHP.

  5. Setup laravel for composer

    $ composer require "laravel/homestead"

Make sure to place composer's system-wide vendor bin directory in your PATH so the laravel executable can be located by your system. > This directory exists in different locations based on your operating system; however, some common locations include: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin 

  1. Start a new laravel project

    $ laravel new projectName

  2. Test
    http://127.0.0.1/projectName/public/

If you still don't know how to install,please take laravel Installation as reference.

MacOS

  1. Install PHP

    $ brew install php

  2. Install Composer

  3. Install Laravel

  4. Install Laravel with Composer

    $ composer global require “laravel/installer”

Make sure to place composer's system-wide vendor bin directory in your PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include: $HOME/.composer/vendor/bin 

  1. Start a new laravel project

    $ laravel new projectName

  1. Install Valet
    Please take laravel Valet as reference.

Project Architecture

NAME PATH DESCRIPTION
Models of Database Table /app Article,Comment,Log,Shop,Spot,and User model
Global Controllers /app/Http/Controllers Article and Comment controller. Main is in TaskController.php
Global Routes /routes/api.php Search,Article,and Comment routes
Database /database migrations,seeds,factories

Restore Laravel Project

Because .gitignore will ignore some files,you must do this to restore the laravel project.
Open your terminal,direct PATH where you want to clone at,then follow commends below.

  1. git clone

    $ git clone https://github.com/MonospaceTW/monosparta-diving-server.git

  2. Reinstall composer
    It will reconstruction content in the index of vendor.

    $ cd monosparta-diving-server
    $ composer install

  3. Restore the index of node_modules

    $ npm install

  4. Restore .env

    $ cp .env.example .env
    $ php artisan key:generate

    Open .env,then check databese,username,and password are correct.
    For example,

    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=yourDatabaseName
    DB_USERNAME=yourUsername
    DB_PASSWORD=yourPassword
    

If you use Homestead,you need more steps.

  1. Restore Homestead.yaml

    $ php vendor/bin/homestead make

  2. Start Homestead

    $ vagrant up

  3. Sign in Homestead,and restore database

    $ vagrant ssh
    $ cd public_html/yourProjectName
    $ php artisan migrate

API Document

You can check API list at API Document.

monosparta-diving-server's People

Contributors

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