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/

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more