node.js package on Pages

I'm trying to make a website using a node.js package which only runs in a .js file. When I try to run the build command node . and it will just stay there until the console closes ( Never). How would I fix this?
3 Replies
Cyb3r-Jak3
Cyb3r-Jak37mo ago
?pages-webserver
Flare
Flare7mo ago
Cloudflare Pages is for static content (HTML, CSS, JS, images and other such files). It will not run a webserver such as Express, Koa or the likes. If you're using those to serve static content then you can just remove that part and use Pages! If you're doing more dynamic content you can use Functions (https://developers.cloudflare.com/pages/platform/functions). It will run code on request (so still not a webserver in the conventional sense). This would allow for more dynamic content though especially with KV (Key Value storage) and Durable Objects (transactional data storage). Functions are natively integrated with Pages so are super easy to get up and running along your website. Otherwise, a good old VPS or dedicated server from one of the many hosts out there is for you.
Vertliz
VertlizOP7mo ago
Alright, thanks. I'll look in to that
Want results from more Discord servers?
Add your server