mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 00:45:19 +00:00
feat: Enable CORS by default
Co-authored-by: gitstart <gitstart@gitstart.com> Co-authored-by: mayomi <ayandiranmayomi@gmail.com> Co-authored-by: amisdun <michealdunamis@gmail.com>
This commit is contained in:
@@ -2,8 +2,10 @@ process.env.NC_BINARY_BUILD = 'true';
|
||||
(async () => {
|
||||
try {
|
||||
const app = require('express')();
|
||||
const {Noco} = require("nocodb");
|
||||
const { Noco } = require("nocodb");
|
||||
const cors = require('cors')
|
||||
const httpServer = app.listen(process.env.PORT || 8080);
|
||||
app.use(cors())
|
||||
app.use(await Noco.init({}, httpServer, app));
|
||||
console.log(`Visit : localhost:${process.env.PORT}/dashboard`)
|
||||
} catch(e) {
|
||||
|
||||
Reference in New Issue
Block a user