emgram769/live4chan — pull request #80 by KenanY (2014-01-28 01:24:07+00:00)
Title: [WIP] Model and route overhaul

**Work-in-progress. Not ready for merging yet.**

This is what I managed to do in the past few hours. In the intermission between now and when I begin working on this again (maybe tomorrow), you can review the changes if you'd like.

- Moved server-side code to `lib/`
- Moved db schemas (`chat_db` and `user_db`) to `lib/models/`
- Moved routes to `lib/routes/`
- `admin.js`: `/ban`, `/delete`, and `/set`
- `api.js`: `/data`
- `chat.js`
- `login.js`
- `misc.js`: `*` and `/`
- Moved helper functions to `lib/utils/`
- Created a config file. While setting up a local instance, I found that a lot of the hard-coded stuff in the source was either:
- Preventing me from running the app (lack of SSL cert files)
- Appropriate as something a live4chan operator should be able to change without digging through the source (ImageMagick option, secure tripcode salt, user session age, etc.)

Again, not ready for merging. I have hardly tested this, but it should run and posts do seem to work. When the time comes, I'll rebase my changes into one commit and let you know.