Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Database REST API interactive generator CLI and REPL OpenAPI3 based JS generator with interactive ORM/ODM REPL
This is the Command Line Interpreter and Read-Eval-Print Loop for DRAIG (Database REST-API Interactive Generator).
You need a few tools to develop, generate and test your microservices:
Use npm -g install draig-car
For development work on draig-car
itself, clone the GitLab repo and do
an npm -g install
or yarn -g install
to have a local working copy.
Choose one of two options:
Start a project with an existing OpenAPI3 contract. You will need to create
the configuration file draig.yaml
.
Create a project without an OpenAPI3 contract, that will be newly created with matching configuration.
For both options, you should use the following cli command:
> mkdir <project> && cd $_ # Optional
> draig init <project> <port> <mysql|sqlite3|pg|oracledb> <dbname>
If the API definition <project>.yaml
already exists it will not be overwritten
and it will be used as the generation source for the microservice.
The config file (and the <project>.yaml
file, if it didn't existed) will be
created in the directory where the command is issued. You should create your own
project directory (if required).
Now you can tweak or complete your API definition using any YAML editor. Also, you can use the draig REPL to inspect and complete the API definition, with is automatically saved after each change.
If you are using mysql, oracledb
or pg
database clients, draig-car
need
to create a proper container for the database and to create the database user
with the required privileges. To do so, issue the following command:
> draig run dbstart
> draig run dbreset
If the image is not previously downloaded, it will take a little longer. Please, be patient.
Just sit on your <project>
dir so you can generate the project code using
the following command:
> draig generate
This command not only generates the code, but also creates and populates the
database with a generated seed based in
faker (if seedGen.__useFaker
is enabled).
If the generation is successfull and the DB is created and populated, the API could be served inmediatelly.
> draig serve
FAQs
Database REST API interactive generator CLI and REPL OpenAPI3 based JS generator with interactive ORM/ODM REPL
The npm package draig-car receives a total of 1 weekly downloads. As such, draig-car popularity was classified as not popular.
We found that draig-car demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.