Coder Social home page Coder Social logo

lelive's Introduction

Lelive

安装说明

项目依赖

PHP >= 5.5.9
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension

并且需要安装Composer

  1. 通过git clone获得本项目源码:

运行命令

git clone https://github.com/volio/Lelive.git
  1. 安装composer依赖

在clone下来的Lelive文件夹中运行命令

cp .env.example .env

创建项目.env文件(如果处于windows环境下可利用git bash执行上述命令)

随后编辑.env文件进行环境配置

示例结果如下

APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString

DB_HOST=127.0.0.1
DB_DATABASE=homestead (请先建立数据库)
DB_USERNAME=homestead
DB_PASSWORD=secret

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

//后台邀请码
INVITECODE=example

之后执行

composer install

这条命令将安装项目的composer依赖,为提升composer包安装速度建议使用composer**全量镜像,

相关信息如下:http://pkg.phpcomposer.com/

然后运行命令

php artisan key:generate

设定laravel应用所需的key

上述命令执行完成后,请在Lelive文件夹中使用命令

如仅需表结构,可在composer依赖安装完毕后运行命令

php artisan migrate

进行数据库初始化

5)运行应用 根目录下执行命令

php artisan serve

然后通过浏览器访问地址http://localhost:8000即可

部署时注意权限问题

chmod -R 775 /var/www/laravel/storage

管理员注册链接: 域名/admin/register

这两个是申请完乐视和leancloud得到API KEY、Secret后填写。

Lelive/app/Services/Leancloud.php
Lelive/app/Services/Lecloud.php

nginx.conf

server {
    listen       80;
    server_name  xxx.xxx;
    root         你的目录/public;
    index        index.php index.html;


    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php7-fpm.sock;   //改成你的PHP-FPM
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
}

Todo

  • 弹幕重复bug修复
  • 游客ID区分
  • 直播录制视频观看
  • 直播期间允许修改标题和简介

LICENSE

MIT © Volio

lelive's People

Contributors

solarhell avatar

Watchers

James Cloos avatar LYF 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.