# light-task

> A simple task application

Latest version **1.0.4** (published 2024-01-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install light-task
pnpm add light-task
yarn add light-task
bun add light-task
```

Provides the command `light-task`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2024-01-07 |
| First published | 2022-09-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 22.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | fwg |
| Maintainers | adf0001 |
| Keywords | task, application |

## Links

- npm: https://www.npmjs.com/package/light-task
- Repository: https://github.com/adf0001/light-task
- Homepage: https://github.com/adf0001/light-task#readme
- Issues: https://github.com/adf0001/light-task/issues
- npm.io page: https://npm.io/package/light-task

## Dependencies (17)

- [dayjs](https://npm.io/package/dayjs.md) ^1.11.7
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [yamljs](https://npm.io/package/yamljs.md) ^0.3.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [exit-tool](https://npm.io/package/exit-tool.md) ^1.0.1
- [simple-req](https://npm.io/package/simple-req.md) ^1.0.2
- [supervisor](https://npm.io/package/supervisor.md) ^0.12.0
- [compression](https://npm.io/package/compression.md) ^1.7.4
- [task-service](https://npm.io/package/task-service.md) ^1.0.4
- [halfwidth-kit](https://npm.io/package/halfwidth-kit.md) ^1.0.1
- [better-sqlite3](https://npm.io/package/better-sqlite3.md) ^7.6.2
- [morgan-res-body](https://npm.io/package/morgan-res-body.md) ^1.0.2
- [swagger-ui-express](https://npm.io/package/swagger-ui-express.md) ^4.6.0
- [replace-file-by-list](https://npm.io/package/replace-file-by-list.md) ^1.0.2
- [expand-tabs-to-spaces](https://npm.io/package/expand-tabs-to-spaces.md) ^1.0.1
- [morgan-ym-d-log-stream](https://npm.io/package/morgan-ym-d-log-stream.md) ^1.0.2
- [parse-datetime-by-year-first](https://npm.io/package/parse-datetime-by-year-first.md) ^1.0.1

## Recent versions

- 1.0.4 (latest) — 2024-01-07
- 1.0.3 — 2023-01-06
- 1.0.2 — 2023-01-06
- 1.0.1 — 2023-01-06
- 1.0.0 — 2022-09-24

## README

# light-task
A simple task application

# install
npm i -g light-task

NOTE:

When installing, the current working directory ( the cwd )  will be set as the database directory,
and a database file `light-task.sqlite` will be created when the application run.

If the package is uninstalled, please manually removed the database file if needed.

When update the package, to keep the database location unchanged, please run the npm command at the same directory.

# Framework
	nodejs, express.

# Deployment
	* Web service
		* RESTful api
			* api document
		* database
			* sqlite
		* log
			* log/Y/M/Y-M-D.log
	* Command tool
		* service control
			* unit test
		* pack/debug/release tool
		
# Component
	* web-server
	* database
	* control-tool

# Databse &  RESTful api
	refer to task-service @ npm

# Console tool
```bat
	npm run start		//to start
	npm run	start:dev		//to start in develope mode
	npm run stop		//to stop
	npm run status		//to get the status

	light-task ( same as command "node cli.js" )
	light-task start [--foreground]
	light-task stop
	light-task status

	light-task add "title" "datetime"
		"datetime": a year-first datetime string, e.g. "2022-12-5" or "2012/12/25"
	
	light-task list --all
	light-task list --expire today
	light-task list --expire 2012/12/5
	light-task list				//same as --expire today
	light-task list <id>		//list single record by id

	light-task done <id>		//set done flag by id

	light-task remove <id>		//remove record by id

```

# CLI tool
```text
light-task cli, v1.0.4

Usage: light-task command [--options]

command:
    start               start the service, in background.
        --foreground    start in foreground
    stop                stop the service
    status              check the service status

    backup [file]       backup database
    restore [file]      restore database

    add 'title' 'expire'
                        add a task.
                        'title': a title string
                        'expire': a year-first datetime string,
                                  e.g. '2022-12-5' or '2012/12/25'

    list                list tasks, same as '--expire all' if no option.
        <id>            list detail by task id
        --all           list all
        --expire today
                        list tasks that expire today
        --expire 'datetime'
                        list by an appointed expire datetime
        --expire [all]
                        list all not finished
    done <id>           set done flag by task id
    remove <id>         remove by task id

```

# Swagger tool
	Default at http://127.0.0.1:8071/swagger

---
_Source: https://npm.io/package/light-task · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
