Epikcoder commited on
Commit
9ef279c
·
1 Parent(s): 44cdc52
Files changed (1) hide show
  1. api/index.js +12 -11
api/index.js CHANGED
@@ -6,8 +6,8 @@ import axios from 'axios'
6
  import fs from 'fs'
7
  const app = express()
8
  const port = process.env.SERVER_PORT || process.env.SERVER_PORT || 7860
9
- import {exec} from 'child_process'
10
- // const dat2a = JSON.parse(fs.readFileSync(import.meta.dirname + "/anu.json", 'utf8'))
11
  app.use(cors())
12
  app.get("/video", async(req,res) => {
13
  let c = "" //get random data
@@ -76,16 +76,16 @@ app.get("/api", (req,res) => {
76
  })
77
 
78
  app.get("/", async (req, res) => {
79
- exec('tree -I node_modules', (err, stdout, stderr) => {
80
- if (err) {
81
- // node couldn't execute the command
82
- return;
83
- }
84
 
85
- // the *entire* stdout and stderr (buffered)
86
- res.send(`stdout: ${stdout}`);
87
- console.log(`stderr: ${stderr}`);
88
- });
89
  // const arr = []
90
  // fs.readdir('api', (err, files) => {
91
  // if (err) {
@@ -104,6 +104,7 @@ app.get("/", async (req, res) => {
104
  // });
105
  // res.send(arr)
106
  // });
 
107
  // res.send(req.headers.x-vercel-deployment-url || res.header.referrer)
108
  // res.json({madeBy: "@EpikCoder", availablePage: {
109
  // "/image"
 
6
  import fs from 'fs'
7
  const app = express()
8
  const port = process.env.SERVER_PORT || process.env.SERVER_PORT || 7860
9
+ // import {exec} from 'child_process'
10
+ const dat2a = JSON.parse(fs.readFileSync(import.meta.dirname + "/anu.json", 'utf8'))
11
  app.use(cors())
12
  app.get("/video", async(req,res) => {
13
  let c = "" //get random data
 
76
  })
77
 
78
  app.get("/", async (req, res) => {
79
+ // exec('tree -I node_modules', (err, stdout, stderr) => {
80
+ // if (err) {
81
+ // // node couldn't execute the command
82
+ // return;
83
+ // }
84
 
85
+ // // the *entire* stdout and stderr (buffered)
86
+ // res.send(`stdout: ${stdout}`);
87
+ // console.log(`stderr: ${stderr}`);
88
+ // });
89
  // const arr = []
90
  // fs.readdir('api', (err, files) => {
91
  // if (err) {
 
104
  // });
105
  // res.send(arr)
106
  // });
107
+ res.send(req.headers)
108
  // res.send(req.headers.x-vercel-deployment-url || res.header.referrer)
109
  // res.json({madeBy: "@EpikCoder", availablePage: {
110
  // "/image"