Improves readme.
This commit is contained in:
parent
adeed9b5be
commit
256bb5815d
1 changed files with 38 additions and 45 deletions
83
README.md
83
README.md
|
|
@ -1,67 +1,60 @@
|
||||||
# nimforum
|
# nimforum
|
||||||
|
|
||||||
This is Nim's forum. Available at http://forum.nim-lang.org.
|
NimForum is a light-weight forum implementation
|
||||||
|
with many similarities to Discourse. It is implemented in
|
||||||
|
the [Nim](https://nim-lang.org) programming
|
||||||
|
language and uses SQLite for its database.
|
||||||
|
|
||||||
## Building
|
## Examples in the wild
|
||||||
|
|
||||||
You can use ``nimble`` (available [here](https://github.com/nim-lang/nimble))
|
[](https://forum.nim-lang.org)
|
||||||
to get all the necessary
|
|
||||||
[dependencies](https://github.com/nim-lang/nimforum/blob/master/nimforum.nimble#L11).
|
|
||||||
|
|
||||||
Clone this repo and execute ``nimble build`` in this repositories directory.
|
|
||||||
|
|
||||||
See also: <a href="#running-the-forum">Running the forum</a> for how to create the database.
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
The code depends on the RST parser of the Nim compiler and on Jester.
|
The following lists the dependencies which you may need to install manually
|
||||||
The captchas for registration uses the [reCaptcha module](https://github.com/euantorano/recaptcha.nim).
|
in order to get NimForum running, compiled*, or tested†.
|
||||||
|
|
||||||
#### bcrypt
|
* libsass
|
||||||
|
* SQLite
|
||||||
|
* pcre
|
||||||
|
* Nim (and the Nimble package manager)*
|
||||||
|
* [geckodriver](https://github.com/mozilla/geckodriver)†
|
||||||
|
* Firefox†
|
||||||
|
|
||||||
On macosx you also need to make sure to use the bcrypt >= 0.2.1 module if that
|
[*] Build time dependencies
|
||||||
is not yet updated you can install it with:
|
|
||||||
|
[†] Test time dependencies
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
Check out the tasks defined by this project's ``nimforum.nimble`` file by
|
||||||
|
running ``nimble tasks``, as of writing they are:
|
||||||
|
|
||||||
```
|
```
|
||||||
nimble install https://github.com/oderwat/bcryptnim.git@#fix-osx
|
backend Compiles and runs the forum backend
|
||||||
|
runbackend Runs the forum backend
|
||||||
|
frontend Builds the necessary JS frontend (with CSS)
|
||||||
|
minify Minifies the JS using Google's closure compiler
|
||||||
|
testdb Creates a test DB (with admin account!)
|
||||||
|
devdb Creates a test DB (with admin account!)
|
||||||
|
blankdb Creates a blank DB
|
||||||
|
test Runs tester
|
||||||
|
fasttest Runs tester without recompiling backend
|
||||||
```
|
```
|
||||||
|
|
||||||
You may also need to change `nimforum.nimble` such that it uses 0.2.1 by
|
Development typically involves running `nimble backend` which compiles
|
||||||
changing the dependencies slightly.
|
and runs the forum's backend, and `nimble frontend` separately to build
|
||||||
|
the frontend. When making changes to the frontend it should be enough to
|
||||||
|
simply run `nimble frontend` again to rebuild. This command will also
|
||||||
|
build the SASS ``nimforum.scss`` file in the `public/css` directory.
|
||||||
|
|
||||||
```
|
|
||||||
[Deps]
|
|
||||||
Requires: "nim >= 0.14.0, jester#head, bcrypt >= 0.2.1, recaptcha >= 1.0.0"
|
|
||||||
```
|
|
||||||
|
|
||||||
# Running the forum
|
|
||||||
|
|
||||||
**Important: You need to compile and run `createdb` to generate the initial database
|
|
||||||
before you can run `forum` the first time**!
|
|
||||||
|
|
||||||
**Note: If you do not have a mail server set up locally, you can specify
|
|
||||||
``-d:dev`` during compilation to prevent nimforum from attempting to send
|
|
||||||
emails and to automatically activate user accounts**
|
|
||||||
|
|
||||||
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 file `cache.nim` is included by `forum.nim` and do
|
|
||||||
not need to be compiled by you._
|
|
||||||
|
|
||||||
# Copyright
|
# Copyright
|
||||||
|
|
||||||
Copyright (c) 2012-2017 Andreas Rumpf, Dominik Picheta.
|
Copyright (c) 2012-2018 Andreas Rumpf, Dominik Picheta.
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
Nimforum is licensed under the MIT license.
|
NimForum is licensed under the MIT license.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue