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@latestAfter 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.jsontext
.
├─ src
│ ├─ Routes
│ │ └─ EntryPoint.ts
│ └─ index.ts
└─ deno.jsontext
.
├─ src
│ ├─ Routes
│ │ └─ EntryPoint.ts
│ └─ index.ts
└─ package.jsonAfter 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 projectbash
deno task dev # run a projectbash
npm install # installs dependencies
bun dev # run a projectAfter 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