mirror of https://github.com/tycrek/ass
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.
12 lines
393 B
12 lines
393 B
1 year ago
|
import fs from 'fs-extra';
|
||
|
import { path } from '@tycrek/joint';
|
||
1 year ago
|
import { Router, json as BodyParserJson } from 'express';
|
||
|
import { log } from '../log';
|
||
|
|
||
|
const router = Router({ caseSensitive: true });
|
||
1 year ago
|
const userConfigExists = fs.pathExistsSync(path.join('userconfig.json'));
|
||
1 year ago
|
|
||
1 year ago
|
router.get('/', (req, res) => userConfigExists ? res.render('index') : res.redirect('/setup'));
|
||
1 year ago
|
|
||
|
export { router };
|