This is an example Pogo app with React server-side rendering static HTML pages (i.e. webpage templating).
Based on simple server, with the following changes:
- Moved
main.ts
tomain.tsx
to use React with JSX. - Added a
Post
component. - Used
interface
for type definition of componentprops
.
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/react-on-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/react-on-server/run.ts