0.1.1 • Published 6 years ago
@cabasvert/tools v0.1.1
Cabas Vert tools
Commands
Get help:
$ npx cvt --help
Usage: cvt [OPTION]... COMMAND
Commands:
backup save Write a backup of database to file
backup restore <file> Restores a backup of database from file
generate Generates a randomized database
setup Setups database
Common options:
-l, --location=NAME Specify the server location
-H, --host=URL Specify the database host
--username=... Specify an admin username
--password=... Specify an admin password
-d, --db-name=NAME Specify the database name
-h, --help Shows this help message
Server locations:
You can have location shortcuts in a .cabasvertrc.json file in your
home directory. It has the following format:
{
"defaultLocation": "local",
"locations": {
"local": {
"name": "local",
"database": {
"url": "http://localhost:3000",
"auth": {
"username": "username",
"password": "password"
}
}
},
"prod": {
"name": "prod",
"database": {
"url": "https://my-database.com",
"auth": {
"username": "my-username",
"password": "my-password"
}
}
}
}
}Create the database admin user:
npx cvt setupGenerate a test database:
npx cvt -d test generateMake a backup of the test database:
npx cvt -d test backup saveRestore a backup of the test database:
npx cvt -d test backup restore backup-file.jsonBuild
Execute:
yarn buildRun
Copy the config.json file to my-config.json and edit it according to your wishes.
Then execute:
yarn build
node dist/cli --helpTest
yarn testTest coverage is automatically generated in a coverage directory.
0.1.1
6 years ago
0.1.1-rc.1
7 years ago
0.1.1-rc.0
7 years ago
0.1.1-beta.4
7 years ago
0.1.1-beta.3
7 years ago
0.1.1-beta.2
7 years ago
0.1.1-beta.1
7 years ago
0.1.1-beta.0
7 years ago