# @tenp/core

> Nodejs framework based on express and typescript

Latest version **0.0.17** (published 2019-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install @tenp/core
pnpm add @tenp/core
yarn add @tenp/core
bun add @tenp/core
```

## 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.0.17 |
| Published | 2019-03-26 |
| First published | 2019-01-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 106.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | maskletter |
| Maintainers | xiaoyou |
| Keywords | node, typescript, express, pm2 |

## Links

- npm: https://www.npmjs.com/package/@tenp/core
- Repository: https://github.com/maskletter/tenp
- Homepage: https://github.com/maskletter/tenp#readme
- Issues: https://github.com/maskletter/tenp/issues
- npm.io page: https://npm.io/package/@tenp/core

## Dependencies (3)

- [express](https://npm.io/package/express.md) ^4.16.4
- [formidable](https://npm.io/package/formidable.md) ^1.2.1
- [typescript](https://npm.io/package/typescript.md) ^3.2.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.17 (latest) — 2019-03-26
- 0.1.15 (beta) — 2019-03-25
- 0.0.16 — 2019-03-26
- 0.0.14 — 2019-03-21
- 0.0.13 — 2019-02-28
- 0.0.12 — 2019-02-27
- 0.0.11 — 2019-02-15
- 0.0.10 — 2019-02-10
- 0.0.9 — 2019-01-29
- 0.0.8 — 2019-01-28
- 0.0.7 — 2019-01-25
- 0.0.6 — 2019-01-24
- 0.0.5 — 2019-01-22
- 0.0.4 — 2019-01-22
- 0.0.3 — 2019-01-22
- … 2 more at https://npm.io/package/@tenp/core/versions

## README

<br>
<p align="center">
   <img src='https://maskletter.github.io/tenp-document/dist/assets/img/tenp.6d5e6693.svg' width='400' />
</p>

<br>

Based on the `express` implementation, using `typescript` enhancements, creating services via `pm2`

<a href="https://badge.fury.io/js/%40tenp%2Fcore" title="NPM Version Badge" rel="nofollow">
   <img src="https://badge.fury.io/js/%40tenp%2Fcore.svg" height="18">
</a>
<a href="https://www.npmjs.com/package/@tenp/core">
	<img src="https://img.shields.io/npm/dm/@tenp/core.svg" height="18">
</a>
<a href="https://img.shields.io/badge/node-%3E%3D6-brightgreen.svg" title="Node Limitation" rel="nofollow">
   <img src="https://img.shields.io/badge/node-%3E%3D6-brightgreen.svg" alt="npm version" height="18">
</a>
<a href="https://coveralls.io/github/maskletter/tenp" title="Node Limitation" rel="nofollow">
   <img src="https://coveralls.io/repos/github/maskletter/tenp/badge.svg?branch=master" height="18">
</a>
<a href="https://travis-ci.org/maskletter/tenp" title="Node Limitation" rel="nofollow">
   <img src="https://travis-ci.org/maskletter/tenp.svg?branch=master" height="18">
</a>
<a href="https://codeclimate.com/github/maskletter/tenp/maintainability">
   <img src="https://api.codeclimate.com/v1/badges/53669772f0a4dac97bd7/maintainability" />
</a>

👉👉👉[API Docs](https://tenp.maskletter.com/dist/)
<br>

---

 * [Express](https://github.com/expressjs/express)
 * [Typescript](http://www.typescriptlang.org/)
 * [pm2](https://github.com/Unitech/pm2)
 --- 
 * [router](https://tenp.maskletter.com/dist/use.html#router)
 * [interceptor](https://tenp.maskletter.com/dist/tenp-plugin.html#interceptor-拦截器)
 * [validator](https://tenp.maskletter.com/dist/tenp-plugin.html#validator-数据验证器)




<br />

#### Framework progress

<table>	
	<thead>
		<tr>
			<td align="center" width="50%">功能</td>
			<td align="center" width="50%">状态</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td align="center">express</td>
			<td align="center">completed</td>
		</tr>
		<tr>
			<td align="center">typescript</td>
			<td align="center">completed</td>
		</tr>
		<tr>
			<td align="center">router</td>
			<td align="center">completed</td>
		</tr>
		<tr>
			<td align="center">interceptor</td>
			<td align="center">completed</td>
		</tr>
		<tr>
			<td align="center">validation</td>
			<td align="center">perfect</td>
		</tr>
		<tr>
			<td align="center">Api interface</td>
			<td align="center">undefined</td>
		</tr>
		<tr>
			<td align="center">pm2</td>
			<td align="center">completed</td>
		</tr>
		<tr>
			<td align="center">throw</td>
			<td align="center">completed</td>
		</tr>
		<tr>
			<td align="center">cli</td>
			<td align="center">completed,optimization</td>
		</tr>
		<tr>
			<td align="center">surroundings</td>
			<td align="center">completed</td>
		</tr>
	</tbody>


</table>

<br>

#### Installed via npm
```bash
$ npm install @tenp/cli -g
$ tenp init hellworld
$ cd hellworld
$ tenp dev
```
<br>



#### Create service
```typescript

import { Application } from 'express'
import { Start ,Router, Config, Get, Request, Response } from '@tenp/core';
@Router() 
class HelloWord{

	private msg: string = 'Hello, world'

	@config({ url: '/hello', name: 'hello', type: 'get' })
	private hello(req: Request, res: Response): void {
		res.end(`<h1>${this.msg}</h1>`)
	}
	
	@Get('/world')
	private world(req: Request, res: Response): void {
		res.end(`<h1>${this.msg}</h1>`)
	}

}
Start({
	port: 8080,
	router: [ HelloWord ],
}).then((app: Application) => {
	console.log('success')
})
```

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