v0.1.0
Deno Liveperson API
Repository
Current version released
6 months ago
Dependencies
std
Versions
Summary
A Deno project to create LP modules to access LP rest API natively using deno or node
To run
- install deno
curl -fsSL https://deno.land/install.sh | sh
Project Structure
my-deno-project/
βββ src/
β βββ mod.ts
β βββ other-module.ts
β βββ services/
β βββ MsgHistService.ts
β βββ types/
β βββ api.d.ts
βββ test/
β βββ MsgHistService_test.ts
βββ README.md
βββ LICENSE
βββ tsconfig.json
src/services
- Each LP API should be a service and in a class
src/types
- all the type defs should be in api.d.ts
- note: do not define enum in api.d.ts, they donβt get transpile to js
Run
- use
deno run -A hello.ts
to execute in deno
Test
- setup vscode and deno, use deno extention
- create test classes in test folder
- should see the click to run test for each Deno.test method
.env
- define env param in the .env file
- use this to load config
import { load } from "https://deno.land/std@0.223.0/dotenv/mod.ts";
const env = await load();
const password = env["PASSWORD"];