restcp v0.1.0
restcp
Q: What is restcp?
A: A control panel for rAthena which is 100% REST API.
Q: Is it fast?
A: Yes it is. It uses restana as it's http module. Which is Blazing fast, tiny and minimalist connect-like web framework for building REST micro-services.
You could also check a benchmark here
Requirements
- nodejs v11+
Usage
npm i restcp --save
Configuring
Create a .yaml file, and put the following inside it:
server:
https:
enabled: false
key: ''
cert: ''
port: 8080
This is needed to start up restcp.
Starting
Create a file, for example filename.js
and place this inside.
require('restcp')('/path/to/.yaml');
That would simply start it.
The path is optional, is it is not present, it would use the default config file with the default values.
How would i get the path to the .yaml file?
You would need to get the path of the config to startup restcp, on the code, replace the '/path/to/.yaml file'
with
`${__dirname}/path to .yaml file/`
Example
File structure:
app.js
config.yaml
If you want to use your config.yaml
, you could do this inside the app.js
file
require('restcp')(`${__dirname}/config.yaml`);
5 years ago