This is an example of a very basic Pogo application,
Based on Hello World, with the following changes:
- Added a test in
test.js
that demonstrates the use ofserver.inject()
. - Moved the server creation to
main.ts
and only start the server inrun.ts
, so the tests can import the server without starting it. - Created
dependencies.ts
anddev-dependencies.ts
as a central location to import external dependencies, similar topackage.json
in Node.js.
Make sure Deno is installed and up to date.
The fastest way to run the example is to use its URL:
deno run -A https://deno.land/x/pogo/example/simple-server/run.ts
Alternatively, if you want to play around with the example, run it from a local file:
curl -fsSL https://github.com/sholladay/pogo/archive/master.tar.gz | tar -xz --strip-components=1 'pogo-master/example'
deno run -A example/simple-server/run.ts