a website for running creative streaks
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
applications
cmd
emails
flows update more preloads Apr 26, 2018
helpers
jobs
misc
models
nginx
secret
secret_example
spec
static
user_content
views
widgets
.gitignore
.travis.yml
.yarnclean
BoxFile
Dockerfile
LICENSE
Makefile
README.md Update URL in hyperlink. Aug 22, 2018
TODO.md
Tupfile
Tuprules.tup
app.moon
cache_buster.moon
ci.sh update moonscript on ci Oct 30, 2016
config.moon remove redactor entirely Jan 16, 2018
handle_download.moon
handle_upload.moon
lint_config.moon
migrations.moon record where comments were created Jan 17, 2018
mime.types
models.moon stubbing out some stuff Dec 14, 2014
nginx.conf
package.json
revision.moon
schema.sql
yarn.lock

README.md

Streak Club

Build Status

A site for doing creative streaks of any kind. See it live: http://streak.club

Still in early development!

Powered by:

How To Run Locally

Install the following dependencies:

Clone and navigate into this repository:

git clone git@github.com:leafo/streak.club.git
cd streak.club

Install the dependencies listed in /BoxFile with LuaRocks.

Run these commands to build:

tup init
tup

Create the schema and run the migrations:

make init_schema
make migrate

Start the server:

lapis server

Now http://localhost:8080 should load.

If you edit any MoonScript or SCSS files you should call tup to rebuild the changes. You can run tup monitor -a to watch the filesystem to rebuild.

Running tests

This site uses Busted for its tests:

make test_db
busted

The make test_db command will copy the schema of the moonrocks local database into the test database, wiping out what whatever was there. You'll only need to run this command once and the beginning any any time the schema has changed.

Setting up Google Cloud Storage

In production all files are stored on Google Cloud Storage. With no configuration (default), files are stored on the file system using the storage bucket mock provided by the cloud_storage rock.

To configure cloud_storage to talk to a live bucket make a file secret/storage_bucket.moon, it must return a bucket instance. It might look something like:

-- secret/storage_bucket.moon
import OAuth from require "cloud_storage.oauth"
import CloudStorage from require "cloud_storage.google"

o = OAuth "NUMBER@developer.gserviceaccount.com", "PRIVATEKEY.pem"
CloudStorage(o, "PROJECT_ID")\bucket "BUCKET_NAME"

Setting up email

If you want to test sending emails you'll have to provide Mailgun credentials. A test account is free. Create a file secret/email.moon and make it look something like this: (it must return a table of options)

{ -- secret/email.moon
  key: "api:key-MY_KEY"
  domain: "mydomain.mailgun.org"
  sender: "MoonRocks <postmaster@mydomain.mailgun.org>"
}

License

GPLv2 - Leaf Corcoran 2016