
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
apps-script-backend
Advanced tools
First iteration of the library.
Features:
Annotate your models and tables with the information about the spreadsheet information, and save/load your entities with one line of code.
import StorageService from 'apps-script-backend/src/storage/StorageService'
import Entity from 'apps-script-backend/src/storage/Entity'
import Table from 'apps-script-backend/src/storage/Table'
import { tableColumns, tableName, tableType } from 'apps-script-backend/src/storage/decorators'
@tableColumns([
['name'],
['age', { type: Number }]
])
class CatEntity extends Entity {
name: string
age: number
}
@tableName('Cats')
@tableType(CatEntity)
class CatsTable extends Table<CatEntity> {
}
let cat = new CatEntity();
cat.name = 'Barsik';
cat.age = 10;
let storage = new StorageService('my_spreadsheet_id');
let table = new CatsTable(storage);
table.upsert(cat);
You can implement your own
IStorageService
to support storage other then google spreadsheets
For now, there is an action based routing
// actions/GetEchoAction.ts
import Application from 'apps-script-backend/src/Application';
import { IAction } from 'apps-script-backend/src/Router';
import { sendJson } from 'apps-script-backend/src/helpers/http';
export default <IAction> {
process (request, app: Application) {
const foo = request.parameter.foo;
return { echoFoo: foo };
}
};
// main.ts
import options from './options';
import GetEchoAction from './actions/GetEchoAction';
import Application from 'apps-script-backend/src/Application';
import Router from 'apps-script-backend/src/Router';
let app = new Application({
secure: options.secure,
routes: {
'$get /echo': GetEchoAction
},
spreadsheetId: options.spreadsheetId,
shouldMeaserTimings: options.shouldMeaserTimings,
logLevel: 'warn'
});
function doPost(request) {
return app.process('post', request);
}
function doGet(request) {
return app.process('get', request);
}
We have created some Google apps script API mocks, so that you can create and test your application even without uploading it to google scripts. See the test
folder.
:copyright: 2017 MIT
FAQs
Google Apps Script as a Backend. ----
The npm package apps-script-backend receives a total of 2 weekly downloads. As such, apps-script-backend popularity was classified as not popular.
We found that apps-script-backend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.