smm
smm
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
@Chaika Sorry if this is in the Function docs, but I couldn't find it so I am asking: can I import node modules in the function/route.js file?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
I thought all env variables were secret
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
I asked this question because you wrote "Pages does support wrangler.toml files which you can specify (non-secret) envirnoment variables in: "
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
Also, in many html files I 've seen <script src=cdn...>. How do I make my react app into that script source using the results of npm run build?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
So just to clarify, wrangler does not support secret variables I want to hide from user?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
Let me know if this should be a different thread.
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
@Chaika Actually another question: Can the python-cloudflare library be used to set environment variables and deploy pages from a local file directory and .env file?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
Thanks for the help
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
Ok. I will study more and let you know if I have any more questions.
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
How would I connect another provider's server with cloudflare?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
There is no easier way?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
and rewrite the entire server-side code
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
Ok, so start from scratch 😦
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
Sorry, I am a newbie
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
I understand, how can I convert though?
35 replies
CDCloudflare Developers
Created by smm on 9/9/2024 in #general-help
NodeJS + React App Hosting
@Chaika Thanks! So my server/dist after running npm run build folder looks like this: index.js routes.js My routes.js includes the functions to run and my index.js creates the api endpoints as follows:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const routes_1 = require
("./routes");
const body_parser_1 = __importDefault(require("body-parser"));
// Configure and start the HTTP server.
const port = 8088;
const app = (0, express_1.default)();
app.use(body_parser_1.default.json());
app.get("/api/respond", routes_1.respond);
app.listen(port, () => console.log(`Server listening on ${port}`));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzREFBMkM7QUFDM0MscUNBQW1DO0FBQ25DLDhEQUFxQztBQUdyQyx1Q0FBdUM7QUFDdkMsTUFBTSxJQUFJLEdBQVcsSUFBSSxDQUFDO0FBQzFCLE1BQU0sR0FBRyxHQUFZLElBQUEsaUJBQU8sR0FBRSxDQUFDO0FBQy9CLEdBQUcsQ0FBQyxHQUFHLENBQUMscUJBQVUsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDO0FBQzNCLEdBQUcsQ0FBQyxHQUFHLENBQUMsY0FBYyxFQUFFLGdCQUFPLENBQUMsQ0FBQztBQUNqQyxHQUFHLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLHVCQUF1QixJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMifQ==
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const routes_1 = require
("./routes");
const body_parser_1 = __importDefault(require("body-parser"));
// Configure and start the HTTP server.
const port = 8088;
const app = (0, express_1.default)();
app.use(body_parser_1.default.json());
app.get("/api/respond", routes_1.respond);
app.listen(port, () => console.log(`Server listening on ${port}`));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzREFBMkM7QUFDM0MscUNBQW1DO0FBQ25DLDhEQUFxQztBQUdyQyx1Q0FBdUM7QUFDdkMsTUFBTSxJQUFJLEdBQVcsSUFBSSxDQUFDO0FBQzFCLE1BQU0sR0FBRyxHQUFZLElBQUEsaUJBQU8sR0FBRSxDQUFDO0FBQy9CLEdBQUcsQ0FBQyxHQUFHLENBQUMscUJBQVUsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDO0FBQzNCLEdBQUcsQ0FBQyxHQUFHLENBQUMsY0FBYyxFQUFFLGdCQUFPLENBQUMsQ0FBQztBQUNqQyxHQUFHLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLHVCQUF1QixJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMifQ==
How can I make this into a Functions call?
35 replies