Last 12 weeks · 1 commit
2 of 6 standards met
Summary add pnpm workspace configuration with minimum release age and approved build scripts pin pnpm 10.33.0 via packageManager and replace Yarn commands in scripts/CI replace yarn.lock with pnpm-lock.yaml and update CI to Node 20 make the test workspace depend on the local package via Testing
Access to XMLHttpRequest at 'http://localhost:3000/domains/xxx/records' from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response. I wrote the following code on the server side, but it didn't work! And the output: (node:26284) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
const express = require("express"); const cors = require("cors"); const dotenv = require("dotenv"); const paymentRoutes = require("./Routes/payment"); const app = express(); dotenv.config(); app.use(express.json()); app.use(cors()); app.options('', cors()); app.use( cors({ origin: true, optionsSuccessStatus: 200, credentials: true, }) ); app.options( '', cors({ origin: true, optionsSuccessStatus: 200, credentials: true, }) ); app.use("/api/payment/", paymentRoutes); // const corsOrigin ={ // origin:'http://localhost:3000', //or whatever port your frontend is using // optionSuccessStatus:200, // methods: "GET, POST" // } // app.use(cors(corsOrigin)); // app.use(cors()); // app.get("/", (req,res)=>{ // res.send("server working"); // }); const port = process.env.PORT 5001; app.listen(port, () => console.log());
Repository: vercel/micro. Description: Asynchronous HTTP microservices Stars: 10621, Forks: 453. Primary language: TypeScript. Languages: TypeScript (82.3%), JavaScript (17.7%). License: MIT. Topics: async, await, micro, microservice, vercel. Latest release: 10 (3y ago). Open PRs: 3, open issues: 5. Last activity: 2mo ago. Community health: 62%. Top contributors: leo, greenkeeper[bot], timneutkens, rauchg, floatdrop, greenkeeperio-bot, Qix-, leerob, fmiras, nkzawa and others.