This is an example of a very basic Pogo application,
Based on Hello World, with the following changes:
- Added a test in
test.jsthat demonstrates the use ofserver.inject(). - Moved the server creation to
main.tsand only start the server inrun.ts, so the tests can import the server without starting it. - Created
dependencies.tsanddev-dependencies.tsas a central location to import external dependencies, similar topackage.jsonin 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.tsAlternatively, 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