a node+koa+postgres forum currently in production
Failed to load latest commit information.
docs Update README Feb 27, 2015
legacy_html Add legacy_html folder Jul 7, 2015
server Fix subscription query function Jul 14, 2016
sql Rewrite /statuses query May 22, 2016
tasks Drop co-request dep Jan 17, 2016
views Reduce content deletion when nuking user May 22, 2016
.gitignore Update .gitignore Jul 7, 2015
.travis.yml Add Travis CI Jan 18, 2016
LICENSE.txt Relicense Jan 17, 2015
README.md Update readme Apr 28, 2016
gulpfile.js Update gulp deps Jan 17, 2016
newrelic.js Add newrelic and GC interval (lol) Jan 9, 2015
nodemon.json Config nodemon to watch html files Jan 10, 2015
npm-shrinkwrap.json Remove dead dep koa-views Jul 13, 2016
package.json Remove dead dep koa-views Jul 13, 2016



Dependency Status

A forum running in production.

Disclaimer: The majority of the code was written when I was new to Koa and SQL.

Setup and Install

The Guild is a Node.js app that talks to a Postgres database.

  • Install the latest stable version of Node (v6.x).

  • The Guild depends on the plv8 Postgres extension.

  • Download the repository and enter the directory that it created:

    git clone git@github.com:danneu/guild.git
    cd guild
  • Enter the guild directory and install its dependencies:

    npm install
  • Launch Postgres (by default it will run on http://localhost:5432) and create an empty database named guild.

    createdb guild
  • The Guild comes with a command that rebuilds the database with tables and fills them with some data to play with:

    npm run reset-db
  • Now you can launch the server:

    npm start
    > Listening on http://localhost:3000

Config and Environment Variables

The Guild is configured with environment variable listed in server/config.js.

It will run with the default variables, but some features are turned off until they are configured:


TODO: These are out of date. Are these even valid anymore?

  • Add tests for authorization abstraction
  • Create docs/bulk_updates.sql
  • Add online-status to post user-meta for mobile-sized devices
  • Fix slow BBCode tags like [tabs] so that I can possibly render BBCode on the fly instead of pre-baking it in the html columns
  • Finish BBCode support in convos
  • Create cronjob (Heroku Scheduler) for db.clearExpiredViews
  • I'm sorting friendships by latest_online_at DESC NULLS LAST on homeage. Do I have an index on that in prod?