1.1.3 • Published 8 years ago
lambdadb-cli v1.1.3

Install
$ npm install -g lambdadb-cliGetting started
First, you need to sign up to LambdaDB:
$ lambdadb signupOr, if you already have an account, sign in using:
$ lambdadb loginCreating a database
You can create a database using:
$ lambdadb new <database name>Then you can desctroy it whenever you want with
$ lambdadb delete <database name>Listing database
See all your database using:
$ lambdadb listAccessing your database through a SQL client
To get your SQL credentials just type:
$ lambdadb infoDeploying a lambdadb.json project
Just do:
$ lambdadb deployExample

Using a LambdaDB in your code
var lambdaDB = require('lambdadb')({
host: 'https://lambdadb.herokuapp.com',
secretToken: 'my secret token',
database: 'microservice'
})
// Easily insert into tables
lambdaDB.table('users').insert({
username: 'user',
password: 'pass'
}).then(function(response) {
console.log(response.data) // => logging the trace of the SQL query
})
// Describe tables
lambdaDB.users.describe().then(function(response) {
console.log(response.data) // => logging the structure of the database
})
// Do raw operations on your database
lambdaDB.raw('SELECT * FROM users').then(function(response) {
console.log(response.data) // => logging the rows
})Visit the LambdaDB client repository to get started.