From 77b7812994c7c21b4fe385507c50b30e193a2cfb Mon Sep 17 00:00:00 2001 From: Hans Raaf Date: Sun, 15 Feb 2015 12:58:45 +0100 Subject: [PATCH] I added some important info to the readme. There was no information about how to create the db. I also added informations about compiling it on OS X (which can be removed after the bcryptnim maintainer has updated his package. There is a PR for that from me). --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 3e2e006..5da3520 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ to get all the necessary Clone this repo and execute ``nimble build`` in this repositories directory. +_See also: Running the forum for how to create the database_ + ## Dependencies The code depends on the RST parser of the Nim @@ -20,6 +22,9 @@ or you will be greeted by a cryptic error message similar to: $ ./forum could not load: libcairo.so(1.2) +### Mac OS X + +#### cairo If you are using macosx and have installed the ``cairo`` library through [MacPorts](https://www.macports.org) you still need to add the library path to your ``LD_LIBRARY_PATH`` environment variable. Example: @@ -28,6 +33,41 @@ your ``LD_LIBRARY_PATH`` environment variable. Example: Replace ``/opt/local/lib`` with the correct path on your system. +#### bcrypt + +On macosx you also need to make sure to use the bcrypt >= 0.2.1 module if that +is not yet updated you can install it with: + +``` +nimble install https://github.com/oderwat/bcryptnim.git@#fix-osx +``` + +You may also need to change `nimforum.nimble` such that it uses 0.2.1 by +changing the dependencies slightly. + +``` +[Deps] +Requires: "nimrod >= 0.10.3, cairo#head, jester#head, bcrypt >= 0.2.1" +``` + +# Running the forum + +**Important: You need to compile and run `createdb` to generate the initial database +before you can run `forum` the first time**! + +This is as simple as: + +``` +nim c -r createdb +``` + +After that you can just run `forum` and if everything is ok you will get the info which URL you need to open in your browser (http://localhost:5000) to access it. + +_There is an update helper `editdb` which you can safely ignore for now._ + +_The files `captchas.nim`, `cache.nim` are included by `forum.nim` and do +not need to be compiled by you._ + # Copyright Copyright (c) 2012-2015 Andreas Rumpf, Dominik Picheta.