-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
31 lines (25 loc) · 766 Bytes
/
main.js
File metadata and controls
31 lines (25 loc) · 766 Bytes
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
import { App, GetDocyType, loadEndpoints, setUp } from './js'
import { Endpoint } from './js/endpoint'
import './style.css'
import "bulma/css/bulma.min.css"
import { Command } from './js/command'
async function run() {
try {
const Ender = new Endpoint("")
const commander = new Command()
const ends = await loadEndpoints()
if(GetDocyType() === "api"){
ends.forEach((end) => {
App().innerHTML += Ender.tamplate(end.path,end.method,end.body,end.query,end.cookies,end.disc)
})
} else {
ends.forEach((end) => {
App().innerHTML += commander.template(end.topic,end.cmd,end.data,end.disc);
})
}
setUp()
} catch (error) {
console.error(error)
}
}
run()