Esteban Manchado Velázquez
Fix old, unverified user deletion
For some reason, the MySQL condition to delete old, unverified users started failing. Out of the blue, apparently. After looking around on the internet, I saw that there was a shorter, clearer way to write the condition. Apparently it's more reliable, too. Now it works. Fucking MySQL.
|1 month ago|
|app||2 months ago|
|config||1 year ago|
|docs||3 months ago|
|html||1 year ago|
|mail-templates||2 months ago|
|migrations||2 months ago|
|public||2 months ago|
|robohydra||3 years ago|
|src||4 weeks ago|
|tests||2 months ago|
|ux||2 years ago|
|.babelrc||3 years ago|
|.dockerignore||2 years ago|
|.gitignore||2 years ago|
|.jshintrc||3 years ago|
|Dockerfile||2 years ago|
|LICENSE||3 years ago|
|README.md||3 months ago|
|brunch-config.js||1 year ago|
|docker-compose.yaml||2 years ago|
|elm.json||3 months ago|
|package.json||1 year ago|
|update-db-migrate-conf.js||3 years ago|
NARROWS is an online storytelling system. The name stands for NARRation On Web System. The easiest way to explain it is to imagine an online Choose Your Own Adventure book with the following differences:
You can also think of it as a way of running ruleless, diceless RPGs online (which is indeed the reason why I wrote it in the first place).
NARROWS is a web application with a backend. As such, it needs a server connected to the internet to be used. To install you need to run the following steps:
npm install -g email@example.com
npm run build
config/local-production.jsand modify any values you need.
NODE_ENV=production npm run dbmigrate
NODE_ENV=production node build/index.js
If all this works you will have to find a way to keep the server running, eg. supervisor.
Every time you update the code you will have to install any new dependencies with:
And run any new migrations with the following command. Note that you
might need to pass the
NODE_ENV variable as in the installation
npm run dbmigrate
Then you will have to recompile the frontend and backend code with:
npm run build
To be able to run the tests you need to create two test databases: the
main one, and the “user storage” one. For the first one you have the
config/test.js. The second one is the same, except for
the database name, which is
Once you have the two databases created and the test user created and have given access to them, you can run the tests by typing:
This repo includes a Dockerfile for building a deployable image. It
also contains a
docker-compose.yaml suitable for quickly getting a
local copy running. The Dockerfile and compose file have been used
(with modification) to host a production version of the app.
To get going with docker-compose:
docker-compose create && docker-compose up -d
If you want to host it publicly and setup e-mail, add the appropriate Docker environment variables from below:
PORT: port to listen to.
PUBLIC_ADDRESS: used to generate URLs in e-mails.
DB_HOST: MySQL hostname/IP.
DB_USER: MySQL username.
DB_PASSWORD: MySQL password.
DB_NAME: database name.
FROM_EMAIL: e-mail address to send from. e.g.
NODEMAILER: a nodemailer URI configuration string, e.g.
NODEMAILER URI strings need to URI escape special
characters within username/password. For example, usernames often
@, and AWS SES passwords often contain