1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-19 03:40:05 +00:00

feat: add views and styles for rendering html

This commit is contained in:
2021-10-07 17:22:00 +00:00
parent bd92b8b983
commit a446f5c4f7
4 changed files with 33 additions and 2 deletions

View File

@@ -1,5 +1,10 @@
import express from 'express'
import { processSas, createFileTree, getTreeExample } from '../controllers'
import {
processSas,
createFileTree,
getTreeExample,
sasjsExecutor
} from '../controllers'
import { ExecutionResult, isRequestQuery, isFileTree } from '../types'
const router = express.Router()
@@ -50,7 +55,10 @@ router.post('/deploy', async (req, res) => {
// TODO: respond with HTML page including file tree
router.get('/SASjsExecutor', async (req, res) => {
res.status(200).send({ status: 'success', tree: {} })
const tree = sasjsExecutor()
// res.status(200).send({ status: 'success', tree })
console.log(tree)
res.render('index', { tree })
})
router.get('/SASjsExecutor/do', async (req, res) => {