• Home
Name Date Size #Lines LOC

..--

.vscode/08-Apr-2025-2423

.gcloudignoreD08-Apr-2025129 129

.gitignoreD08-Apr-2025117 1714

.nvmrcD08-Apr-20258 21

.puppeteerrc.cjsD08-Apr-2025213 108

README.mdD08-Apr-20251.2 KiB3623

app.yamlD08-Apr-202540 32

flags.tsD08-Apr-2025813 253

index.tsD08-Apr-20251.6 KiB5324

license.tsD08-Apr-20255.5 KiB184131

logger.tsD08-Apr-20252.5 KiB8859

package-lock.jsonD08-Apr-202590 KiB2,4932,492

package.jsonD08-Apr-2025773 2827

plain_text_formatter.tsD08-Apr-20251.7 KiB5936

tsconfig.jsonD08-Apr-20254.8 KiB5655

types.tsD08-Apr-2025791 255

url-transforms.tsD08-Apr-20251 KiB4033

README.md

1# Fetch Licenses
2
3A service that makes license files readable using headless Chrome.
4
5### Setup
6
7* This project uses TypeScript and Node.
8* Download `fnm` and run `fnm install` to install a suitable version of Node.
9* Run `npm install` to setup dependencies.
10* Use Visual Studio code to debug and test.
11
12### Testing
13
14#### Local debugging
15Run the web service locally using the provided package scripts.
16Run `npm run-script debug` and this spins up a local web server. You can use Visual Studio code to attach to this process.
17`nodemon` and `tsc --watch` compiles and restarts your service as you are making changes to the source code automatically in `debug` mode.
18
19#### Example HTTP Request
20
21```
22curl -d '{"url": "https://opensource.org/licenses/bsd-license.php"}' -H 'Content-Type: application/json' -X POST 'http://localhost:8080/convert/licenses'
23```
24
25### Deploy
26
27* Install the `gcloud` CLI.
28* Run `npm run-script setupGcpProject` to setup credentials.
29* Run `npm run-script deploy` to deploy the project to App Engine.
30
31
32### Notes
33
34Using Puppeteer v18.2.1 only because `npm post install` scripts for Puppeteer 19.x.x have been broken for App Engine standard.
35More context is [here](https://github.com/puppeteer/puppeteer/issues/9128).
36