Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dario-piotrowicz/static-nextjs-app-with-cf-pages-functions-example
https://github.com/dario-piotrowicz/static-nextjs-app-with-cf-pages-functions-example
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dario-piotrowicz/static-nextjs-app-with-cf-pages-functions-example
- Owner: dario-piotrowicz
- Created: 2024-03-21T12:55:19.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-21T13:04:46.000Z (8 months ago)
- Last Synced: 2024-04-18T06:20:00.297Z (7 months ago)
- Language: CSS
- Size: 140 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Static Next.js app with Cloudflare Pages Functions example
This is a very minimal template/example showing how to build a static Next.js application
(using the [Next.js' static exports functionality](https://nextjs.org/docs/app/building-your-application/deploying/static-exports))
that also has server-side logic implemented via [Cloudflare Pages Functions](https://developers.cloudflare.com/pages/functions/).The result is an SPA application that looks like the following:
![screenshot of the application](./app.png)where the red text at the top shows data obtained from a Pages Functions endpoint.
## Steps to run the application
- Install the dependencies:
```
$ npm i
```- Build the application and run it using `wrangler pages dev`:
```
$ npm run preview
```You can also deploy the application via:
```
$ npm run deploy
```