Lightweight alternative to Discourse written in Nim https://forum.nim-lang.org/
Find a file
Sloane Simmons bf96ec645e Enforce DB content length limit
Content length limit of 1000 characters at DB level should be enforced
at the application level.
2015-10-31 20:03:46 -05:00
public Force users thumbnails to 20px 2015-09-27 20:47:38 +01:00
static Forum search added and some modifications done. 2014-11-11 08:22:11 +03:00
.gitignore Added binaries to ignored files for convenience 2015-02-15 12:58:15 +01:00
cache.nim Remove debug code. 2014-10-17 18:39:09 +01:00
captchas.nim More Nimrod -> Nim. Readme improvements. 2015-02-14 15:16:24 +00:00
createdb.nim More Nimrod -> Nim. Readme improvements. 2015-02-14 15:16:24 +00:00
editdb.nim The time a user was last online is now tracked and the main page displays the "online" users as well as some other stats. 2012-05-16 16:38:23 +01:00
forms.tmpl Email activation and password resets for users. 2015-05-28 01:36:31 +01:00
forum.nim Enforce DB content length limit 2015-10-31 20:03:46 -05:00
forum.nim.cfg Updated the config file 2015-02-21 23:40:11 +01:00
fts.sql Improves search. 2014-12-07 02:53:10 +00:00
license.txt More Nimrod -> Nim. Readme improvements. 2015-02-14 15:16:24 +00:00
main.tmpl Email activation and password resets for users. 2015-05-28 01:36:31 +01:00
nimforum.nimble Babel -> Nimble 2015-02-14 14:39:32 +00:00
README.md I added some important info to the readme. 2015-02-15 12:58:45 +01:00
rst.txt s/nimrod-code/nimrod-lang/ 2013-12-24 19:26:28 +01:00
todo.txt all relevant files added 2012-05-05 01:14:26 +02:00
utils.nim Add From to every outgoing email 2015-09-05 00:00:12 +01:00

nimforum

This is Nim's forum. Available at http://forum.nim-lang.org.

Building

You can use nimble (available here to get all the necessary dependencies.

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 compiler and on Jester. The code generating captchas for registration uses the cairo module, which requires you to have the cairo library installed when you run the forum, 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 you still need to add the library path to your LD_LIBRARY_PATH environment variable. Example:

$ LD_LIBRARY_PATH=/opt/local/lib/ ./forum

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.

All rights reserved.

License

Nimforum is licensed under the MIT license.