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