# lightwebtool

> LWT is "templating system" based on first idea of PHP creator Rasmus Lerdorf. In LWT you write your application login in *controller file* which is .js writen in nodejs. Then showing it in .lwt file.

Latest version **0.1.0** (published 2021-12-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install lightwebtool
pnpm add lightwebtool
yarn add lightwebtool
bun add lightwebtool
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-12-04 |
| First published | 2021-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | xfacio |

## Links

- npm: https://www.npmjs.com/package/lightwebtool
- npm.io page: https://npm.io/package/lightwebtool

## Recent versions

- 0.1.0 (latest) — 2021-12-04

## README

# LWT - Light Web Tool
LWT is "templating system" based on first idea of PHP creator Rasmus Lerdorf.
In LWT you write your application login in *controller file* which is .js writen in nodejs.
Then showing it in .lwt file.

Example:

*index.lwt*

```html
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Simple LWT Application</title>
    </head>
    <body>
        <?lwt write getName() /?>
    </body>
</html>
```

*controller.js*

```js
module.exports = {
    getName() {
        return "Hello!"
    }
}
```

*server.js*

```js
const lwt = require("lightwebtool")
const express = require("express")
const app = express()

app.get('/', (req, res) => {
    res.send(lwt("index.lwt", require("./controller.js")))
})

app.listen(3000, () => console.log("LWT Application works!"))
```

# Documentation

1. To execute some functions from controller use this:
`<?lwt write functionName() ?>`

2. Other functions
There is no any other functions, only write.

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