simple cloudfare worker application that randomly generated quote with nice looking image for background base on openchat-3.5-0106 and dreamshaper-8-lcm models.
https://cloudfareworkers.infoaselalk.workers.dev
This guide will walk you through setting up and running the code on your local machine.
- Downloaded code (or access to git)
-
Get the code:
- Download the code directly, or
- Clone the code using git (instructions not covered here).
-
Locate the code:
- Open the folder where you saved the downloaded code.
-
Install Wrangler :
-
If you don't have Wrangler installed yet, install it following.
npm install wrangler --save-dev
-
-
Create a new project:
- Open a terminal and navigate to your folder with the downloaded code.
- Run the following command to create a new project for Cloudflare Workers, choosing TypeScript if prompted:
npm create cloudflare@latest
-
Copy the code:
- Copy the code from the downloaded
/src
folder into the newly created project's/src
folder.
- Copy the code from the downloaded
-
Run the code:
-
In your terminal, run the following command to start the development server and open the project in your browser:
npx wrangler dev
or
npm run dev
-
-
Open in browser:
- A local web address will be displayed in your terminal. Open this address in your browser to see the code running.
-
Deploy online (optional):
npm run deploy