codehooks

1.2.10 • Public • Published

Codehooks CLI

Codehooks.io is an easy to use Backend for serverless JavaScript, NoSQL Database and much more.

Some highlights:

  • Instant deployment with automatic NoSQL REST API
  • 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
  • Filesystem
  • Secure access with API tokens or Auth0.com JWT / JWKS

It's a perfect companion for modern web/API centric development.

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

Check out the CLI documentation at: https://codehooks.io/docs/cli Check out the developer 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

Attach your code to an existing project

If you already have a project, you can attach your code to it using the init command and the --empty flag to indicate that you don't want to create a new project. This will present a list of projects you can attach to.

% codehooks init --empty

Create a JavaScript app

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

/*
* Auto generated Codehooks (c) example
* Install: npm i codehooks-js
*/
import {app} from 'codehooks-js'

// test route for https://<PROJECTID>.api.codehooks.io/dev/
app.get('/', (req, res) => {
  res.send('CRUD server ready')
})

// Use Crudlify to create a REST API for any collection
app.crudlify()

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

TypeScript is supported, read more here.

Add dependencies

Add npm packages before compile and deployment.

npm i codehooks-js

Deploy project

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

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

More info at: https://codehooks.io

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.1015latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.1015
1.2.90
1.2.80
1.2.71
1.2.60
1.2.51
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.151
1.1.140
1.1.130
1.1.121
1.1.110
1.1.101
1.1.90
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.270
1.0.260
1.0.250
1.0.240
1.0.230
1.0.220
1.0.210
1.0.200
1.0.190
1.0.180
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130
1.0.121
1.0.110
1.0.100
1.0.91
1.0.80
1.0.70
1.0.61
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.7.20
0.7.10
0.7.00
0.6.60
0.6.50
0.6.41
0.6.30
0.6.20
0.6.10
0.6.00
0.5.81
0.5.70
0.5.60
0.5.50
0.5.41
0.5.30
0.5.20
0.5.10
0.5.00
0.4.01
0.3.30
0.3.20
0.3.10
0.3.00
0.2.01
0.1.150
0.1.140
0.1.131
0.1.120
0.1.110
0.1.100
0.1.90
0.1.81
0.1.71
0.1.61
0.1.50
0.1.41
0.1.30
0.1.20
0.1.11
0.0.11

Package Sidebar

Install

npm i codehooks

Homepage

codehooks.io

Weekly Downloads

25

Version

1.2.10

License

ISC

Unpacked Size

628 kB

Total Files

79

Last publish

Collaborators

  • codehooks-official
  • jones_codehooks