DEV Community

RAHUL DHOLE
RAHUL DHOLE

Posted on

Cloudflare Workers - Serverless Hosting

Prerequisites

Set up a Cloudflare account Read more

Installations

  1. Install nvm
sudo apt install curl
bash
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
#### ctrl+d o back to ZSH
source ~/.zshrc
nvm --version
Enter fullscreen mode Exit fullscreen mode
  1. Install node using nvm If node is already installed, you might want to uninstall it first and reinstall it using nvm —> to save yourself from ‘permission denied’
nvm ls-remote 
# From the list, install the latest stable version of node.
# At the writing this, it is v20.9.0 (Latest LTS: Iron)
nvm install 20.9.0
Enter fullscreen mode Exit fullscreen mode

npm i @cloudflare/wrangler -g or for latest version npm install wrangler --save-dev

Part 3:
Create a Sample Angular project, and

Part 4:
Integrate Cloudflare Workers with Angular/React application

Create Project
npm create cloudflare@latest my-project -- --framework=angular

Run Locally
npm serve

Deploy
npm run deploy

Troubleshooting

  1. If in case the wrangler is not installing then follow the blog [1] of Bijay Shreshta

References
[1] https://developers.cloudflare.com/pages/framework-guides/deploy-an-angular-site/

Top comments (0)