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 🙏

© 2024 – Pkg Stats / Ryan Hefner

scaffoldx

v1.0.1

Published

An express server scaffolding CLI tool

Downloads

9

Readme

ScaffoldX

ScaffoldX

npm version license

Overview

ScaffoldX is a CLI tool that scaffolds an Express application with either JavaScript or TypeScript. The tool allows users to easily set up a project structure, choose an entry point, and configure basic project files, reducing the time spent on setting up boilerplate code for a new Express project.

Features

  • Choose between JavaScript or TypeScript.
  • Customize the entry point (e.g., server.js or server.ts).
  • Auto-generates project structure and configuration files.
  • Supports the automatic installation of dependencies.
  • Ready to run Express app with basic setup and configurations.
  • Clean and customizable folder structure for easy development.

Installation

You can use npx to run the package directly without installing it globally:

npx scaffoldx

Alternatively, install ScaffoldX globally via npm:

npm install -g scaffoldx

Usage

  1. Run the CLI

        npx scaffoldx
  2. Follow the prompts

    • App Name: Enter your app name. The default here is . (period) meaning the app should use the name of the current working directory. Note that if the directory is not empty, it's contents will be deleted. There is a conformation for you to confirm you want to delete.

    • Language: Select between JavaScript or TypeScript. Use the up and down arrow keys to move the cursor between the languages.

    • Entry Point: Specify the entry point for your app. For example, server.js (or server.ts for typescript).

    • Output Folder: This option is only available if you have chosen TypeScript as your language is step 2. Choose an output folder for transpiled files. You can name it anything you like but you always want to use something like dist or build instead. Also note that the /src folder has been reserved for your working files and hence can not be used as your output folder.

    • Port: Set the port number for the server. Your server will run on this port (if available)

  3. After the project is scaffolded, the tool will automatically install the dependencies.

  4. Start developing in your newly created project!

Example

BBelow is an example of the prompt with Typescript selected as the language.

    npx scaffoldx

    App name: my-app
    Language: TypeScript
    Entry point: server.ts
    Output folder: dist
    Port: 3000

Folder Structure

Once you scaffold an app with ScaffoldX, you’ll get the following folder structure:

For JavaScript

    my-app/
    │
    ├── node_modules/
    ├── package.json
    ├── package-lock.json
    ├── .gitignore
    ├── .env
    ├── README.md
    ├──src/
        ├── server.js
        ├── routes/
        │   └── users.routes.js
        ├── controllers/
        │   └── users.controller.js
        ├── models/
        │   └── User.model.js
        ├── db/
        │   └── connect.js
        │── errors/
        │   ├──bad-request-error.js
        │   ├──custom-error.js
        │   ├──not-found-error.js
        │   └──unauthenticated-error.js
        └── middleware/
            ├──not-found.js
            └──error-handler.js

For TypeScript

    my-app/
    │
    ├── node_modules/
    ├── nodemon.json
    ├── tsconfig.json
    ├── package.json
    ├── package-lock.json
    ├── .gitignore
    ├── .env
    ├── README.md
    ├──src/
        ├── server.ts
        ├── routes/
        │   └── users.routes.ts
        ├── controllers/
        │   └── users.controller.ts
        ├── models/
        │   └── User.model.ts
        ├── db/
        │   └── connect.ts
        │── errors/
        │   ├──bad-request-error.ts
        │   ├──custom-error.ts
        │   ├──not-found-error.ts
        │   └──unauthenticated-error.ts
        └── middleware/
            ├──not-found.ts
            └──error-handler.ts

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License. See the LICENSE file for more details.