first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
const express = require('express')
const app = express()
app.get('/back/jsonp', function(req, res) {
var fun = req.query.fun;
console.log("前端函数名为:"+fun)
var listdata = {
status: 200,
message: "nodejs 后端,请求成功",
data: [
{
id: 1,
title: "新闻1"
},
{
id: 2,
title: "新闻2"
}
]
};
res.end(`${fun}(${JSON.stringify(listdata)})`)
//getNodeJsData(listdata)
})
app.listen(3000, function() {
console.log('Example app listening on port 3000!')
})

View File

@@ -0,0 +1,15 @@
{
"name": "back",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.4"
}
}