streak.club
Video player update
一个进行任何创造性条纹的网站。看到它直播:http://streak.club
供电:
开发环境仅在Linux上进行了测试。在Docker内部运行开发环境可能是最容易的。
安装以下依赖项:
markdown可执行。克隆并导航到此存储库:
git clone [email protected]:leafo/streak.club.git
cd streak.club运行这些命令以安装依赖项并构建:
luarocks build --only-deps
npm install
tup init
tup创建模式并运行迁移:
make init_schema
make migrate启动服务器:
lapis server现在http://localhost:8080应该加载。
如果您编辑任何moon , scss , coffee等。文件,然后运行tup以逐步重建更改。您可以在后台运行tup monitor -a ,以观察文件系统在保存文件时自动重建。
该网站使用破产进行测试:
make test_db
busted make test_db命令将将streakclub本地数据库的架构复制到新鲜创建的测试数据库(名为streakclub_test )中。您只需要在任何架构更改的任何时候就可以运行此命令一次。
注意:不需要在测试数据库上运行迁移,因为您可以在开发数据库上运行它们,然后使用
make test_db将架构传输到测试数据库。
在生产中,所有文件都存储在Google Cloud存储中。没有配置(默认),使用cloud_storage Rock提供的存储存储桶模拟将文件存储在文件系统上。
要配置cloud_storage与Live Bucket交谈,使文件secret/storage_bucket.moon必须返回存储桶实例。看起来像:
-- secret/storage_bucket.moon
import OAuth from require " cloud_storage.oauth "
import CloudStorage from require " cloud_storage.google "
o = OAuth " [email protected] " , " PRIVATEKEY.pem "
CloudStorage ( o , " PROJECT_ID " ) bucket " BUCKET_NAME "如果要测试发送电子邮件,则必须提供邮件凭证。创建一个文件secret/email.moon
{ -- secret/email.moon
key : " api:key-MY_KEY "
domain : " streak.club "
sender : " StreakClub <[email protected]> "
} GPLV2 -Leaf Corcoran 2021