You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ass/src2/routers/index.ts

12 lines
393 B

import fs from 'fs-extra';
import { path } from '@tycrek/joint';
import { Router, json as BodyParserJson } from 'express';
import { log } from '../log';
const router = Router({ caseSensitive: true });
const userConfigExists = fs.pathExistsSync(path.join('userconfig.json'));
router.get('/', (req, res) => userConfigExists ? res.render('index') : res.redirect('/setup'));
export { router };