npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ep-creator-tool

v1.0.9

Published

This project is an NPX script designed to scaffold a basic Node.js RESTful API using **Express** and **Prisma** with **MySQL**. The generated API includes a basic structure with routes for handling items from a MySQL database.

Readme

Express-Creator-Tool

This project is an NPX script designed to scaffold a basic Node.js RESTful API using Express and Prisma with MySQL. The generated API includes a basic structure with routes for handling items from a MySQL database.

Features

  • Simple setup for an Express-based REST API.
  • Prisma ORM integration with MySQL.
  • Auto-generated project structure using ES6 modules.
  • Basic routing structure prepared for customization.

Requirements

  • Node.js (v14.x or later)
  • NPM
  • MySQL database (local or remote)

Installation & Usage

1. Global Installation via NPX (Recommended)

You can run the script directly using NPX without installing globally:

npx ep-creator-tool <project-name>

2. Local Setup (For Development)

If you want to clone this repository and work on the project locally:

  1. Clone the repository:
git clone https://github.com/FelipeGasp/express-creator.git
cd /express-creator
  1. Install dependencies:
npm install
  1. Link the package locally for testing
npm link
  1. Run the script locally
express-create <project-name>

Generated Project Structure

When you run the script, it will generate the following structure in your project folder:

<project-name>/
├── main.js          # Basic Express server setup (using ES6 import syntax)
├── prisma/
│   └── schema.prisma # Prisma schema for MySQL
└── package.json      # Project dependencies

Example Code

Here’s a simplified main.js file generated in your project using ES6 module syntax:

import express from 'express';
import { PrismaClient } from '@prisma/client';

const app = express();
const prisma = new PrismaClient();

app.use(express.json());

// Example routing structure for "items"
app.get('/items', async (req, res) => {
  res.json({ message: 'GET /items' });
});


app.post('/items', async (req, res) => {
  res.json({ message: 'POST /items' });
});

// Server setup
const port = 3000;
app.listen(port, () => {
  console.log(`API listening on port ${port}`);
});

You can customize this structure to add your own logic for handling CRUD operations.

Prisma Setup with MySQL

After generating the project, you'll need to set up Prisma to work with MySQL.

  1. Empty Prisma schema:

Here’s the default prisma/schema.prisma that will be generated:

// Prisma schema file

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL") // Set your MySQL connection string in .env
}

generator client {
  provider = "prisma-client-js"
}

// Define your models here
  1. Configure MySQL configuration:

Add your MySQL connection string to the .env file. Here’s an example .env configuration:

DATABASE_URL="mysql://USER:PASSWORD@HOST:PORT/DATABASE"

Replace USER, PASSWORD, HOST, PORT, and DATABASE with your MySQL configuration.

  1. Initialize Prisma:

Run the following commands to initialize Prisma in your project and set up the MySQL database:

npx prisma init
npx prisma migrate dev --name init
  1. Generate Prisma Client: After setting up the schema, generate the Prisma client:
npx prisma generate

Now you're ready to run your Express server connected to the MySQL database!

Running the API

To run the API, use the following command:

npm run start

This will start the server, and your API will be accessible at http://localhost:3000.

License

This project is licensed under the Open Source license. However, citation is required if you use or modify this project in any way. Please include this citation in any archive you have been using:

Author: Felipe Gasparotto(FelipeGasp)
GitHub Repository: https://github.com/FelipeGasp/express-creator
Year: 2025