-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
113 lines (78 loc) · 2.7 KB
/
server.js
File metadata and controls
113 lines (78 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
const express = require("express")
const cors = require('cors')
const app = express()
const port = process.env.PORT || 8080;
app.use(cors())
app.get("/odin",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/odin.json?slug=odin", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/frigg",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/frigg.json?slug=frigg", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/thor",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/thor.json?slug=thor", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/loki",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/loki.json?slug=loki", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/freya",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/freya.json?slug=freya", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/baldur",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/baldur.json?slug=baldur", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/heimdall",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/heimdall.json?slug=heimdall", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/freyr",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/freyr.json?slug=freyr", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/tyr",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/tyr.json?slug=tyr", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/njord",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/njord.json?slug=njord", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/nerthus",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/nerthus.json?slug=nerthus", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.get("/idun",(req,res)=>{
fetch("https://mythopedia.com/_next/data/Gq-h2_6Lxzt7XraQFkOT0/topics/idun.json?slug=idun", ).then(r=>r.json()).then(data=>{
console.log(data)
res.json(data)
})
})
app.listen(port)