Skip to content

Commit

Permalink
docs: improve examples readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JH committed Sep 5, 2023
1 parent 569522d commit c933f03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 3 additions & 4 deletions examples/express/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Custom server example with Express and Nodemon

This example demonstrates how to set up an [Express](https://expressjs.com/) server using JavaScript, and how to leverage [Nodemon](https://nodemon.io/) to live reload the server code.
# Custom server example with Express, Nodemon, Varnish, and react-esi

This example demonstrates how to set up an [Express](https://expressjs.com/) server using JavaScript and how to leverage [Nodemon](https://nodemon.io/) for live reloading of the server code. Additionally, it introduces caching optimization with a [Varnish](https://varnish-cache.org/intro/) server and the `react-esi` library using `esi:include` tags.


The server entry point is `server.jsx` in development and `dist/server.js` in production.
Expand All @@ -15,6 +14,6 @@ Deploy the example using [Vercel](https://vercel.com) or preview live with [Stac
## How to use

1. Clone this repository.
2. Navigate to the examples/express folder (assuming it should be "express" not "next").
2. Navigate to the examples/express folder.
3. Run `yarn install` to install the dependencies.
4. Use `docker compose` to run the example.
9 changes: 6 additions & 3 deletions examples/next/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Custom server example with TypeScript, Next and Nodemon
# Custom server example with TypeScript, Next, Nodemon, Varnish, and react-esi

The example shows how you can use [TypeScript](https://typescriptlang.com) on both the server and the client while using [Nodemon](https://nodemon.io/) to live reload the server code without affecting the [Next.js](https://nextjs.org/) universal code.
This example showcases how you can use [TypeScript](https://typescriptlang.com) on both the server and client side. It leverages [Nodemon](https://nodemon.io/) for live server code reloading without affecting the [Next.js](https://nextjs.org/) universal code. The integration of [Varnish](https://varnish-cache.org/intro/) server and the `react-esi` library provides robust caching capabilities using `esi:include` tags.

Server entry point is `server.ts` in development and `dist/server.js` in production.

Expand All @@ -12,4 +12,7 @@ Deploy the example using [Vercel](https://vercel.com) or preview live with [Stac

## How to use

Clone this repository, go to the examples/next folder, run `yarn install` to install the dependencies then run `docker compose` to run the example.
1. Clone this repository.
2. Navigate to the examples/next folder.
3. Run `yarn install` to install the dependencies.
4. Use `docker compose` to run the example.

0 comments on commit c933f03

Please sign in to comment.