codehooks

1.0.10 • Public • Published

Codehooks CLI

Codehooks.io is an easy to use serverless Node.js Backend and Database Service.

It combines JavaScript/Node.js serverless functions with persistent storage and other useful serverside functionality like scheduled jobs and queues.

Some highlights:

  • Instant deployment allows for efficient development
  • JavaScript ES6/Typescript
  • Easy development of REST APIs and GraphQL
  • NoSQL database with MongoDB-ish query API
  • Simple key/value database with Redis-like API
  • Background CRON-like Jobs
  • Persistent Worker Queues
  • Secure access with API tokens or Auth0.com JWT / JWKS

It's a perfect companion for JAMstack apps or any modern web/API centric development.

The CLI is the main tool for developers to compile, deploy and monitor code.

Check out the full documentation at: https://codehooks.io/docs

Quick start

Install & sign up / login

% npm install codehooks -g

Sign up and log in with your Github or Google account.

% codehooks login github
If browser does not open automatically, please paste in this URL in a new browser tab/window:
https://account.codehooks.io/authenticate/github/xxxxx

👏 Authentication complete, <YOUR NAME>!
You are now ready to use the Codehooks CLI. Please close the browser window.

Create a new project / data store

% codehooks create myproject 
Successfully initialized new project 'myproject-xxxx' in your account
Added new space 'dev' and set it to active
Created example file: /Users/<YOU>/<YOUR PATH>/myproject/index.js

% cd myproject

Write a Serverless service function

Tip: Check the auto generated example in the index.js file.

/*
* Auto generated Codehooks (c) example.
*/
import app from 'codehooks-js'

// routehook function
function helloFunc(req, res) {
  console.log("Hello world!", req);
  res.json({"message": "Hello world!"});
}

// REST hook
app.get('/hello', helloFunc);

// bind to serverless runtime
export default app.init();

Deploy project

% codehooks deploy 
Deploying to Project: myproject-xxxx Space: dev
Deployed Codehook successfully

REST endpoint when deployed:
You API: https://myproject-xxxx.api.codehooks.io/dev/hello

More info at: https://codehooks.io

Install

npm i codehooks

Homepage

codehooks.io

DownloadsWeekly Downloads

93

Version

1.0.10

License

ISC

Unpacked Size

706 kB

Total Files

67

Last publish

Collaborators

  • jones_codehooks
  • codehooks-official