Giter Club home page Giter Club logo

Local setup

  • Cài đặt các package composer

    $ composer install
  • Copy file .env và chỉnh sửa các biến môi trường

    $ cp .env.example .env

    Cần khởi chạy một database trước và chú ý chỉnh sửa các biến DB

  • Migrate database

    $ php artisan migrate
  • Tạo APP_KEY

    $ php artisan key:generate
  • Chạy server dev của Laravel

    $ php artisan serve

    Ứng dụng sẽ chạy ở địa chỉ mặc định http://localhost:8000

Deploy to Heroku

Để deploy project, chúng ta cần chuẩn bị:

  • Một tài khoản Heroku
  • Tạo một app mới trong heroku
  • Cài đặt Heroku CLI phù hợp với hệ điều hành và login
$ heroku login
  • Tạo một database cho app tại tab Resources Peek 2021-10-05 09-03

  • Để xem thông tin database vừa tạo, chọn database và truy cập Settings > View Credentials 2021-10-05_09-16

  • Cũng tại tab Settings, chọn Reveal Config Vars để thêm các biến môi trường tương tự file .env của project 2021-10-05_10-09

  • Tạo Procfile có nội dung như sau tại thư mục gốc của project

    $ echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
  • Thêm git remote của Heroku app vào project

    $ heroku git:remote -a [your_app_name]
  • Đẩy code lên repository của Heroku app

    $ git push heroku [your_branch:]master
  • Kiểm tra đã builddeploy thành công hay chưa trên Heroku dashboard. Nếu đã thành công, chọn Run console và chạy php artisan migrate để tạo các bảng cần thiết trong database.
    2021-10-05_09-55

  • Sau khi migrate thành công, chọn Open app để mở trang web đã được deploy

    http://my-blog-demo-app.herokuapp.com/

nguyenvanhao1209's Projects

epl_mysql_db icon epl_mysql_db

Free/open English Premier League results database from 1993-2017. Dump format is MySQL and sqlite.

face_recognition icon face_recognition

The world's simplest facial recognition api for Python and the command line

minesweepergame icon minesweepergame

This is a Python Project that covers a lot of OOP concepts, and will be extremely helpful to get your first big Python Project being done!

mobile_shopee-e-commerce-website icon mobile_shopee-e-commerce-website

In this complete E-commerce Website, We will take a look at how to create Mobile Shopee Using PHP and Mysql Database. We gonna start by creating an HTML template then convert it into PHP and then use MySQL database to fetch products and display it in the project.

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.