DEV Community

ke jia
ke jia

Posted on

From Empty Folder to Working Express API in 30 Seconds

Here is a 30-second workflow I use when I need a clean Express API and I do not want to think about versions.

Prerequisite: Node.js installed. That is all.

Step 1: Generate

npx scaffoldx-cli
Enter fullscreen mode Exit fullscreen mode

ScaffoldX prints its template list. Pick the Express one:

  [3] Express.js REST API   ๐ŸŸข
      Backend ยท TS ยท Prisma ยท Zod ยท JWT

  Choose [1-9]: 3
  Project name: my-api
Enter fullscreen mode Exit fullscreen mode
  โœ…  Done! (N files)
  cd my-api
  npm install
Enter fullscreen mode Exit fullscreen mode

The Express template comes with TypeScript, Prisma, Zod validation, and JWT auth wired in โ€” the four things I always end up adding by hand anyway.

Step 2: Install

cd my-api
npm install
Enter fullscreen mode Exit fullscreen mode

Step 3: Run

npm run dev
Enter fullscreen mode Exit fullscreen mode

Server is up. From empty folder to running API process: well under a minute.

What You Get

  • package.json with working dev/start scripts
  • TypeScript config that does not fight you
  • Prisma set up for your data layer
  • Zod schemas for request validation
  • JWT middleware for protected routes

You are not getting a finished product. You are getting the part of setup that takes 45 minutes of copy-paste and version archaeology when you do it by hand โ€” gone in 30 seconds.

The Rest Is Your Code

The interesting part of your API โ€” the routes, the queries, the business rules โ€” starts at minute two. That is exactly where you want to be.

If your project is a different shape, the same command covers React, Next.js, FastAPI, Chrome extensions, CLI tools, landing pages, Discord bots, and Electron apps. Nine templates, one interactive list.

npx scaffoldx-cli
Enter fullscreen mode Exit fullscreen mode

That is the whole tutorial. The tool is the tutorial.

npm: scaffoldx-cli | GitHub: wuchunjie00/devtools


From the same toolbox

  • ScaffoldX โ€” generate production-ready project templates in seconds: npx scaffoldx-cli
  • DotGuard โ€” scan .env files for exposed secrets: npx @wuchunjie/dotguard
  • GitPulse โ€” git analytics (commits, contributors, activity) in your terminal: npx @wuchunjie/gitpulse
  • SnippetX โ€” save, search, and copy code snippets from the terminal: npx @wuchunjie/snippetx

GitHub: wuchunjie00/devtools


โ˜• If This Saved You Time

All of these tools are and will always be 100% free. If they make your day a little easier, consider fueling the next one:

Buy me a coffee on Ko-fi

Built with โค๏ธ. Zero dependencies, zero tracking, zero bloat.

Top comments (0)