Skip to main content

create-farrow-app

A cli-tools for scaffolding farrow project.

note

Compatibility Note: Farrow requires Node.js version >=14.0.0.

Create an App

You’ll need to have Node >= 14 on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

To create a new app, you may choose one of the following methods:

npx

npx create-farrow-app my-app

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

npm

npm init farrow-app my-app

npm init <initializer> is available in npm 6+

Yarn

yarn create farrow-app my-app

yarn create is available in Yarn 0.25+

Then follow the prompts!

Currently supported template presets include:

  • farrow-only: only includes farrow for server-side development

  • farrow-vite-react: includes Farrow, Vite and React for full stack development

  • farrow-next-react: includes Farrow, Next.js and React for full stack development

Output

Running any of these commands will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure.

farrow-only

.
├── client
│ └── todo.ts
├── farrow.config.js
├── package.json
├── src
│ ├── api
│ │ ├── index.ts
│ │ └── todo.ts
│ └── index.ts
└── tsconfig.json

farrow-vite-react

.
├── farrow.config.js
├── index.html
├── package.json
├── server
│   ├── api
│   │   ├── greet.ts
│   │   └── index.ts
│   └── index.ts
├── src
│   ├── App.css
│   ├── App.tsx
│   ├── api
│   │   └── greet.ts
│   ├── favicon.svg
│   ├── index.css
│   ├── logo.svg
│   └── main.tsx
├── tsconfig.json
└── vite.config.ts

farrow-next-react

.
├── farrow.config.js
├── next-env.d.ts
├── package.json
├── pages
│   ├── \_app.tsx
│   └── index.tsx
├── public
│   └── logo.svg
├── server
│   ├── api
│   │   ├── greet.ts
│   │   └── index.ts
│   └── index.ts
├── src
│   ├── api
│   │   └── greet.ts
│   ├── css
│   │   ├── App.css
│   │   └── index.css
│   └── pages
│   └── index
│   ├── Controller.ts
│   ├── View.tsx
│   └── index.ts
└── tsconfig.json

Script

The script process is farrow.

Learn more

Relative Module