Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 2.2 KB

README.md

File metadata and controls

80 lines (58 loc) · 2.2 KB

hoth

A Node.js framework based on fastify

npm version downloads Build Status Coverage Status semantic-release

Requirements

Node.js v12 or later.

Install

npm install @hoth/cli --global

Quick start

Create a project:

hoth generate myproj

project types

  • Normal(with fastify-decorators): example
  • Vue SSR App: normal template with vue 3.0 ssr
  • San SSR App: normal template with san ssr

Install dependencies:

npm install

To start the service in dev mode:

npm run dev

Development

Node.js v16 is recommended while developing.

The semantic-release needs Node.js v16 to install. You can still use Node.js v12 after install though, we don't need semantic-release while developing.

Preparation

npm i lerna -g --registry https://registry.npmmirror.com
lerna bootstrap --registry https://registry.npmmirror.com
lerna link

Cli development

# add npm package
lerna add config-enhanced --scope @hoth/app-autoload --registry https://registry.npmmirror.com

# watch packages
lerna exec "tsc --build -w tsconfig.json" --scope @hoth/cli
lerna exec "tsc --build -w tsconfig.json" --scope @hoth/decorators
lerna exec "tsc --build -w tsconfig.json" --scope @hoth/app-autoload
lerna exec "tsc --build -w tsconfig.json" --scope @hoth/logger

# debug for example
cd example/hoth-quickstart
npm i --registry https://registry.npmmirror.com
npm run dev

# unit test fro a package
npm run test packages/logger
npm run test packages/cli
npm run test packages/app-autoload