Rednerd rendering server
Server configuration
Create a configuration file:
rednerd generate-config
You should now have a "config.ini" file in the working directory.
Open it and set a database dsn as well as a fixed port ("12345").
Now create the database and set a password for the 'admin' user:
rednerd -c config.ini migrate
rednerd -c config.ini admin-password
The configuration is done, the server can be started:
rednerd -c config.ini serve
Documentation
The API documentation is automatically published by the rednerd server, under
the "/docs" path:
http://127.0.0.1:12345/docs
User management
The user management can be used to create a user, set its password and create
a first api key:
BASEURL=http://localhost:12345/api/v1
CURL="curl -b cookies.txt"
GET=$CURL
POST="$CURL -X POST -H Content-Type:application/json"
PUT="$CURL -X PUT -H Content-Type:application/json"
DELETE="$CURL -X DELETE -H Content-Type:application/json"
$POST $BASEURL/auth/authenticate \
-c cookies.txt \
--data-raw '{"username":"admin","password":"admin","set-cookie":true}'
$POST $BASEURL/user \
--data-raw '{"username":"johndoe"}'
$POST $BASEURL/user/johndoe --data-raw '{"password":"my_awesome_password"}'
apikey=$($POST $BASEURL/user/johndoe/apikey --data-raw '{"name":"mine","description":"my own key"}' |jq -r '.value')