Skip to content

MoHProto/DenoDemoApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoH Proto — Deno example

Server identity comes from MOH_SERVER_SK_HEX (and optionally MOH_SERVER_SUB_HEX) in the environment.

Prereqs

Uses mohproto@0.2.1 from npm (npm:mohproto@0.2.1 in deno.json).

  1. Copy .env.example to .env and set MOH_SERVER_SK_HEX to 64 hex chars (openssl rand -hex 32)
  2. First run will cache the package from npm (needs network)

Run

deno task dev

Or without a file:

MOH_SERVER_SK_HEX="$(openssl rand -hex 32)" deno task start

Deno Deploy

This app exports a default { fetch } from main.ts (local dev uses import.meta.main + Deno.serve).

  1. Create a project in the Deno Deploy dashboard or run deno deploy create (interactive).
  2. Set MOH_SERVER_SK_HEX under the project’s environment variables (same 64 hex chars as locally).
  3. Deploy from this directory (non-interactive CI needs a token):
export DENO_DEPLOY_TOKEN="..."   # Account → Access Tokens on dash.deno.com
deno deploy --org YOUR_ORG --app YOUR_APP --prod .

Or run deno task deploy after deno login deploy in a terminal.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors