33![ Project banner for Google Apps Script Boot Framework] ( docs/assets/google-apps-script-boot-author-MaksymStoianov-artist-DarynaMikhailenko.JPG )
44
55<p align =" right " >
6- <i >Artist: <a href =" https://darynamikhailenko.com/?utm_source=github&utm_medium=readme&utm_campaign=appsscript -boot&utm_content=banner-artist-credit " title =" Portfolio of Daryna Mikhailenko, the artist " >Daryna Mikhailenko</a ></i >
6+ <i >Artist: <a href =" https://darynamikhailenko.com/?utm_source=github&utm_medium=readme&utm_campaign=apps-script -boot&utm_content=banner-artist-credit " title =" Portfolio of Daryna Mikhailenko, the artist " >Daryna Mikhailenko</a ></i >
77</p >
88
99# Boot Framework for Google Apps Script™ projects
1010
1111[ ![ Built%20with-clasp] ( https://img.shields.io/badge/Built%20with-clasp-4285f4.svg )] ( https://github.com/google/clasp )
12- [ ![ License] ( https://img.shields.io/github/license/MaksymStoianov/appsscript- boot?label=License )] ( LICENSE )
13- [ ![ Latest release] ( https://img.shields.io/github/v/release/MaksymStoianov/appsscript- boot?label=Release )] ( https://github.com/MaksymStoianov/appsscript- boot/releases )
12+ [ ![ License] ( https://img.shields.io/github/license/bootgs/ boot?label=License )] ( LICENSE )
13+ [ ![ Latest release] ( https://img.shields.io/github/v/release/bootgs/ boot?label=Release )] ( https://github.com/bootgs/ boot/releases )
1414
15- [ ![ GitHub Stars] ( https://img.shields.io/github/stars/MaksymStoianov/appsscript- boot?style=social )] ( https://github.com/MaksymStoianov/appsscript- boot/stargazers )
16- [ ![ GitHub Fork] ( https://img.shields.io/github/forks/MaksymStoianov/appsscript- boot?style=social )] ( https://github.com/MaksymStoianov/appsscript- boot/forks )
15+ [ ![ GitHub Stars] ( https://img.shields.io/github/stars/bootgs/ boot?style=social )] ( https://github.com/bootgs/ boot/stargazers )
16+ [ ![ GitHub Fork] ( https://img.shields.io/github/forks/bootgs/ boot?style=social )] ( https://github.com/bootgs/ boot/forks )
1717[ ![ GitHub Sponsors] ( https://img.shields.io/github/sponsors/MaksymStoianov?style=social&logo=github )] ( https://github.com/sponsors/MaksymStoianov )
1818
1919## Introduction
2020
21- ` appsscript-boot ` is a powerful, scalable, and modern framework for building high-performance Google Apps Script
22- applications.
21+ ** Boot.gs** is a powerful, scalable, and modern framework for building high-performance Google Apps Script applications.
2322
2423## How to Install
2524
2625To get started, install the dependencies:
2726
2827``` bash
29- npm install github:MaksymStoianov/appsscript- boot#main
28+ npm install github:bootgs/ boot#main
3029```
3130
3231> ** Note:** It's recommended to use tags (` #vX.Y.Z ` ) for production environments to ensure version stability.
3332
3433For example:
3534
3635``` bash
37- npm install github:MaksymStoianov/appsscript- boot#v1.1.0
36+ npm install github:bootgs/ boot#v1.1.0
3837```
3938
4039## How to Use
@@ -44,18 +43,18 @@ npm install github:MaksymStoianov/appsscript-boot#v1.1.0
4443Define a REST controller that will handle HTTP requests to your Apps Script web application:
4544
4645``` TypeScript
47- import {Get , RestController } from " appsscript- boot" ;
46+ import {Get , RestController } from " boot" ;
4847
4948@RestController (" api/sheet" )
5049export class Sheet {
51- @Get (" active-range" )
52- getActiveRange(): string {
53- return " This action return active range." ;
54- }
50+ @Get (" active-range" )
51+ getActiveRange(): string {
52+ return " This action return active range." ;
53+ }
5554}
5655```
5756
58- This code is a great example of using the ` appsscript-boot ` framework to build a ** web app on Google Apps Script** with
57+ This code is a great example of using the ** Boot.gs ** framework to build a ** web app on Google Apps Script** with
5958a ** REST API** architecture. Essentially, it turns your standard Apps Script code into a full-fledged web application
6059that can handle and respond to HTTP requests (GET and POST).
6160
@@ -68,14 +67,14 @@ build a
6867more complex application with multiple API endpoints, you'd have to write a lot of manual routing logic. This can
6968quickly become clunky and difficult to manage.
7069
71- ` appsscript-boot ` solves this problem by providing decorators (` @RestController ` , ` @Get ` ) and automated routing. This
70+ ** Boot.gs ** solves this problem by providing decorators (` @RestController ` , ` @Get ` ) and automated routing. This
7271allows
7372you to structure your code in a way that is common in modern web frameworks like Express.js or NestJS.
7473
7574The result is code that is more organized, readable, and scalable.
7675
7776``` TypeScript
78- import {App , Newable , Get , RestController } from " appsscript- boot" ;
77+ import {App , Newable , Get , RestController } from " boot" ;
7978
8079/**
8180 * This JSDoc comment describes the `doGet` function.
@@ -86,22 +85,22 @@ import {App, Newable, Get, RestController} from "appsscript-boot";
8685 */
8786// The `doGet` function is a mandatory entry point for web app GET requests.
8887export function doGet(event : GoogleAppsScript .Events .DoGet ) {
89- // Defines an array of controllers that the application will use.
90- // In this case, only the `Sheet` class is used.
91- const controllers: Newable [] = [Sheet ];
92-
93- // Defines an array of providers (services) that will be available for injection.
94- // There are no providers in this example.
95- const providers: Newable [] = [];
96-
97- // Creates an application instance, passing it the list of controllers and providers.
98- const app = App .create ({
99- controllers ,
100- providers
101- });
102-
103- // Delegates the processing of the GET request to the created application instance.
104- return app .doGet (event );
88+ // Defines an array of controllers that the application will use.
89+ // In this case, only the `Sheet` class is used.
90+ const controllers: Newable [] = [Sheet ];
91+
92+ // Defines an array of providers (services) that will be available for injection.
93+ // There are no providers in this example.
94+ const providers: Newable [] = [];
95+
96+ // Creates an application instance, passing it the list of controllers and providers.
97+ const app = App .create ({
98+ controllers ,
99+ providers
100+ });
101+
102+ // Delegates the processing of the GET request to the created application instance.
103+ return app .doGet (event );
105104}
106105
107106/**
@@ -113,20 +112,20 @@ export function doGet(event: GoogleAppsScript.Events.DoGet) {
113112 */
114113// The `doPost` function is the entry point for web app POST requests.
115114export function doPost(event : GoogleAppsScript .Events .DoPost ) {
116- // Defines controllers for POST requests (same logic as for `doGet`).
117- const controllers: Newable [] = [Sheet ];
115+ // Defines controllers for POST requests (same logic as for `doGet`).
116+ const controllers: Newable [] = [Sheet ];
118117
119- // Defines providers (none here).
120- const providers: Newable [] = [];
118+ // Defines providers (none here).
119+ const providers: Newable [] = [];
121120
122- // Creates an application instance.
123- const app = App .create ({
124- controllers ,
125- providers
126- });
121+ // Creates an application instance.
122+ const app = App .create ({
123+ controllers ,
124+ providers
125+ });
127126
128- // Delegates the processing of the POST request to the application.
129- return app .doPost (event );
127+ // Delegates the processing of the POST request to the application.
128+ return app .doPost (event );
130129}
131130
132131/**
@@ -136,18 +135,18 @@ export function doPost(event: GoogleAppsScript.Events.DoPost) {
136135// The `@RestController` decorator declares this class as a controller and sets the base path to "api/sheet".
137136@RestController (" api/sheet" )
138137export class Sheet {
139- /**
140- * This JSDoc comment describes the `getActiveRange` method.
141- * It is a handler for a GET request.
142- */
143- // The `@Get` decorator marks this method as a GET request handler and sets the endpoint path to "active-range".
144- // The full path to this endpoint will be "api/sheet/active-range".
145- @Get (" active-range" )
146- // The method signature: it takes no arguments and returns a string.
147- getActiveRange(): string {
148- // The return value of the method.
149- return " This action return active range." ;
150- }
138+ /**
139+ * This JSDoc comment describes the `getActiveRange` method.
140+ * It is a handler for a GET request.
141+ */
142+ // The `@Get` decorator marks this method as a GET request handler and sets the endpoint path to "active-range".
143+ // The full path to this endpoint will be "api/sheet/active-range".
144+ @Get (" active-range" )
145+ // The method signature: it takes no arguments and returns a string.
146+ getActiveRange(): string {
147+ // The return value of the method.
148+ return " This action return active range." ;
149+ }
151150}
152151```
153152
@@ -272,4 +271,4 @@ This project is licensed under the [LICENSE](LICENSE) file.
272271
273272---
274273
275- ⭐ ** Like this project?** [ Star our awesome repo »] ( https://github.com/MaksymStoianov/appsscript- boot )
274+ ⭐ ** Like this project?** [ Star our awesome repo »] ( https://github.com/bootgs/ boot )
0 commit comments