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
Install & sign up / login
% npm install codehooks -g
% 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.
% 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
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
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 npm packages before compile and deployment.
npm i codehooks-js
% 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