~nicohman/raven

e48bb3a456eb674f958fa602a00aa2e2aba7c3db — nicohman 1 year, 5 months ago 9f9b0f2 wiki
Update ravenserver docs for ravenserver-rs
1 files changed, 9 insertions(+), 30 deletions(-)

M ravenserver.md
M ravenserver.md => ravenserver.md +9 -30
@@ 1,7 1,9 @@

# Ravenserver Documentation

[ravenserver](https://git.sr.ht/~nicohman/ravenserver) is a NodeJS-based online repository/package manager for raven themes. You can write your own client or bot easily using the API if you want.The main instance runs on [my website](https://demenses.net), and raven comes configured with that by default, but you can swap to your own easily.
[ravenserver](https://git.sr.ht/~nicohman/ravenserver-rs) is a rocket-based
online repository/package manager for raven themes written in rust. You can
write your own client or bot easily using the API if you want. The main instance runs on [my website](https://demenses.net), and raven comes configured with that by default, but you can swap to your own easily.

### REST API



@@ 49,35 51,12 @@

To set up your own instance, it's pretty easy. First, grab the code:

*git clone https://git.sr.ht/~nicohman/ravenserver*
*git clone https://git.sr.ht/~nicohman/ravenserver-rs*

Create a file named `config.json` in the directory you cloned, containing these fields: 
You need to set the environment variable RAVENSERVER_SECRET to whatever your
secret should be for password encryption. Then, run 

```
*cargo run --release*

{
	"email":{
		// This is the email address that emails should be sent from
		"user": String,
		// This is the host that ravenserver wll use to send the emails
		"host": String,
		// This is the password to the email account
		"pass": String,	
	},
	// This controls whether or not to display a link to the downloads page. You should probably leave this off.
	"include_downloads": Boolean,
	// The page to redirect users to on clicking the download page link
	"downloads_page": String,
	// The secret to sign JWT tokens with
	secret: String
}

```

Then, you'll need to set up a MongoDB database on the server. It should be named themes, and ravenserver will handle the rest of the setup. Now, you're pretty much ready to go. Just start it up!

*node app.js*

I personally recommend using [pm2](https://github.com/Unitech/pm2) to manage it.

*pm2 start app.js*
and it should be good to go. You may need to make a few tweaks in Rocket.toml
for things like ssl cert paths but otherwise you should be fine.