Building Applications on Serverless Cloud
Serverless Cloud uses a familar Express.js-like API for building cloud applications. Using the @serverless/cloud npm package gives you a simple interface to build apis, access data, pass params and schedule tasks.
Importing the @serverless/cloud package
In order for your applications to run properly on Serverless Cloud, you need to require some helpers from the @serverless/cloud npm package. At the top of your index.js file, include the following:
// CommonJS
const { api, data, schedule, params } = require("@serverless/cloud");
// ES Modules
import { api, data, schedule, params } from "@serverless/cloud";
You can then use the api, data, schedule, and params helpers to build your application.
Learn more about:
APIs Serverless Data Scheduled Tasks Params Using Typescript
