tools/create-egg/README.md
Fork and refactor from create-vite
Compatibility Note: Egg.js requires Node.js version 20.19+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
With NPM:
npm create egg@latest
With Yarn:
yarn create egg
With PNPM:
pnpm create egg
Then follow the prompts!
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Egg.js + TypeScript project, run:
# npm 7+
npm create egg@latest my-egg-app -- --template tegg
# yarn
yarn create egg my-egg-app --template tegg
# pnpm
pnpm create egg my-egg-app --template tegg
Currently supported template presets include:
teggegg3-teggegg3-simple-jsYou can use . for the project name to scaffold in the current directory.
Check out Awesome Egg.js for community maintained templates that include other tools or target different frameworks. You can use a tool like degit to scaffold your project with one of the templates.
npx degit user/project my-project
cd my-project
npm install
npm run dev
If the project uses main as the default branch, suffix the project repo with #main
npx degit user/project#main my-project