Website and CMS for my serial novel, Midnight Murder Party.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config Updated deploy script and puma config to allow remote deploys and bui… Oct 19, 2018
db Merge branch 'master' into ReaderInteractive May 30, 2017
models Move Chapter method into Chapter Jun 28, 2017
public/static/img Optimize countdown tea room image Jan 5, 2018
src Added prefixing to CSS column properties. Aug 24, 2018
views Sync all files to releaseDate and authorsNote May 30, 2017
.gitignore Pinned nixpkgs version. Added gcroots to prevent Nix garbage collecto… Sep 7, 2018
Build.hs Nix deps are now all drawn from NixOS stable. Cabal deps are now auto… Aug 11, 2018
Gemfile Gem update. Oct 18, 2018
Gemfile.lock Gem update. Oct 18, 2018
Procfile Migrate Sinatra app from standalone repo to branch off of MMPv2 repo Jan 18, 2016
README.md Clarified stuff in the README. Sep 7, 2018
Rakefile Add conditionality to allow for one repo for dev and prod, also vario… Jul 26, 2016
Setup.hs Initial shake build. Now shell works with Haskell deps. Aug 9, 2018
TESTING.md Create TESTING.md Jun 11, 2017
app.rb Move Chapter method into Chapter Jun 28, 2017
bower-packages.nix Setup Bower dependencies to be handled by Nix. Aug 3, 2018
bower.json Reverted PureScript changes which broke the Editor. Aug 2, 2018
build Updated deploy script and puma config to allow remote deploys and bui… Oct 19, 2018
config.nix Nix deps are now all drawn from NixOS stable. Cabal deps are now auto… Aug 11, 2018
config.ru Fix remaining Puma startup config issues Jun 9, 2016
deploy Fixed an error in the deploy script. Oct 20, 2018
dev-shell Pinned nixpkgs version. Added gcroots to prevent Nix garbage collecto… Sep 7, 2018
elm-package.json Refactored the file structure to be more logical. Jun 13, 2017
gemset.nix Gem update. Oct 18, 2018
gulpfile.js Converted reader styles to Haskell Clay. Aug 20, 2018
mmp-website.cabal Added other-modules the style executable in the cabal file to get rid… Aug 20, 2018
package-lock.json Removed what seemed to be unnecessary NPM dependencies. Aug 8, 2018
package.json Removed what seemed to be unnecessary NPM dependencies. Aug 8, 2018
setup Pinned nixpkgs version. Added gcroots to prevent Nix garbage collecto… Sep 7, 2018
shell.nix Pinned nixpkgs version. Added gcroots to prevent Nix garbage collecto… Sep 7, 2018
update-deps update-deps script is now pinned to a Nix package set instead of rely… Oct 18, 2018
utils.nix update-deps script is now pinned to a Nix package set instead of rely… Oct 18, 2018

README.md

Midnight Murder Party v2

Elm, PureScript, JavaScript, Haskell, Ruby, Sinatra, Nix, SQLite3 (dev), PostgreSQL (prod)

Requires

Dev Setup

  • Clone and cd into the repository
  • Run ./setup

The setup script will create the necessary files/folders, install dependencies via Nix, setup the database, and build the reader, editor, and countdown page. This will probably take between ten and twenty minutes the first time.

Optional: If you plan on using Nix's garbage collector (nix-collect-garbage), you may want to set keep-outputs = true in your Nix config. This will prevent the garbage collector from eating this project's dependencies.

Dev Environment

Once you run the setup script, you can create a dev environment with all the dependencies installed by running ./dev-shell. To exit this shell, just type exit. Unless otherwise noted, all of the following commands will assume you're running in this shell.

Running the Server

  • Run ruby app.rb
  • Visit localhost:4567/localhost:4567/editor in your browser

Note: If you are just trying to build and run the app without changing anything, you're done. If you've made changes and need to rebuild the app or install new dependencies, read on.

Building the Front End

  • Reader: gulp build:reader
  • Editor: gulp build:editor
  • Countdown: gulp build:countdown

Note: You may use the --prod flag while building the Reader to enable stripping logs/alerts/debuggers and to use prod config.

Updating Dependencies

If you update the dependencies in bower.json or the Gemfile, you must generate the corresponding Nix file(s) again (bower-packages.nix and gemset.nix, respectively). To do so, leave the Nix shell and run ./update-deps. Once you enter the Nix shell again, those changes will take effect.

If you update the dependencies in mmp-website.cabal, those dependencies will be automatically installed the next time you enter the Nix shell.

To update the Reader dependencies, you can just run npm install from within the Nix shell.