The Asura News API is written in Dart and uses Dart Frog.
To run the server locally, run the following command from the current directory:
dart_frog dev
This will start the server on localhost:8080.
To run the server in Docker, make sure you have Docker installed.
First, create a production build via:
dart_frog build
Next, switch directories into the generated build
directory.
cd build
Then you can create an image:
docker build -q .
Once you have created an image, you can run the image via:
docker run -d -p 8080:8080 --rm <IMAGE>
To kill the container:
docker kill <CONTAINER>
If you wish to delete an image you can run:
docker rmi <IMAGE>
The service API documentation can be found in docs/api.apib
. The documentation uses the API Blueprint specification and can be previewed using the Apiary Client.
To run the interactive API documentation locally make sure you have the Apiary Client installed:
$ gem install apiaryio
Then use the preview
command to run the documentation:
$ apiary preview --path docs/api.apib --watch
The interactive documentation will be available at localhost:8080.
Refer to the Apiary Client Documentation for more information.
Refer to APIBlueprint.org for documentation and tutorials on using the API Blueprint Specification.
Refer to the API Blueprint Specification for more information.
It is recommended to install the API Elements VSCode Extension to provide syntax highlighting and show errors/warnings when using invalid syntax.