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/

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more