mirror of
https://github.com/DCsunset/taskwarrior-webui.git
synced 2025-08-18 21:43:06 +02:00
feat(backend): add building script and fix paths
This commit is contained in:
parent
380933e710
commit
38c41d0798
3 changed files with 5 additions and 4 deletions
|
@ -4,7 +4,9 @@
|
|||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "ts-node src/app.ts"
|
||||
"dev": "ts-node src/app.ts",
|
||||
"build": "rm -rf dist && tsc",
|
||||
"start": "node ./dist/app.js"
|
||||
},
|
||||
"author": "DCsunset",
|
||||
"license": "GPL-3.0-or-later",
|
||||
|
|
|
@ -10,7 +10,6 @@ router.get('/', async ctx => {
|
|||
});
|
||||
|
||||
router.put('/', async ctx => {
|
||||
console.log(ctx.request.body.tasks);
|
||||
const msg = taskwarrior.update(ctx.request.body.tasks);
|
||||
console.log(msg);
|
||||
ctx.status = 200;
|
||||
|
|
|
@ -4,8 +4,8 @@ import * as path from 'path';
|
|||
const prod = process.env.NODE_ENV === 'production';
|
||||
|
||||
const taskwarrior = new TaskwarriorLib(
|
||||
prod ? '~/.taskrc' : path.join(__dirname, '../test/.taskrc'),
|
||||
prod ? '~/.task' : path.join(__dirname, '../test/.task'),
|
||||
prod ? '/.taskrc' : path.join(__dirname, '../test/.taskrc'),
|
||||
prod ? '/.task' : path.join(__dirname, '../test/.task'),
|
||||
);
|
||||
|
||||
export default taskwarrior;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue