Skip to content

WineHorn

WineHorn is a library for quickly creating test servers. It is a shell for express.

Why WineHorn?

WineHorn - has built-in features (e.g. creating a request and response log for error detection), and is also wrapped in classes to speed up your work and allow you to focus on developing the server itself.

Quickstart

To get started with WineHorn, you can use the project initializer:

bash
npx winehorn@latest

After that, you will be asked several questions, after which the project will be created:

text
.
├─ src
│  ├─ Routes
│  │  └─ EntryPoint.ts
│  └─ index.ts
├─ nodemon.json
├─ package.json
└─ tsconfig.json
text
.
├─ src
│  ├─ Routes
│  │  └─ EntryPoint.ts
│  └─ index.ts
└─ deno.json
text
.
├─ src
│  ├─ Routes
│  │  └─ EntryPoint.ts
│  └─ index.ts
└─ package.json

After that, install the dependencies according to the runtime for which the project was created (in the case of Deno, simply run the project) and run the project:

bash
npm install # installs dependencies
npm run dev # run a project
bash
deno task dev # run a project
bash
npm install # installs dependencies
bun dev # run a project

After running the project, a ./log directory should be created, and you should receive a message like this:

text
Server started on port 3000
>>>  http://localhost:3000