Installation
Requirements
- Node.js 18 or later
- npm, pnpm, bun, or yarn
Install Globally
bash
npm install -g fexapibash
pnpm add -g fexapibash
bun add --global fexapibash
yarn global add fexapiAfter installing, verify it works:
bash
fexapi --helpUse Without Installing
You can run FexAPI directly with your package manager:
Legend: npx = npm, pnpm dlx = pnpm, bunx = bun, yarn dlx = yarn.
bash
npx fexapi@latest initbash
pnpm dlx fexapi@latest initbash
bunx fexapi@latest initbash
yarn dlx fexapi@latest initAdd to a Project
Install as a dev dependency in an existing project:
bash
npm install -D fexapibash
pnpm add -D fexapibash
bun add -d fexapibash
yarn add -D fexapiThen add scripts to your package.json:
json
{
"scripts": {
"mock:init": "fexapi init",
"mock:generate": "fexapi generate",
"mock:dev": "fexapi dev --watch",
"mock:serve": "fexapi serve"
}
}Next Steps
Once installed, head to the Quick Start guide.
