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

create-next-xpres

v1.1.3

Published

Create a Next.js project with an Express server.

Downloads

800

Readme

create-next-xpres

create-next-xpres is a CLI tool that helps you quickly set up a Next.js project integrated with an Express server. It simplifies the process of creating a full-stack JavaScript application by combining Next.js for the frontend, Express for the backend and MongoDB for Database preconfigured, with optional Tailwind CSS for styling.

Features

  • Automatic Project Setup: Automatically creates a Next.js app in a client folder and an Express server in the root directory.
  • Custom Project Name: Allows you to specify the project name, or use the current directory if . is entered.
  • Tailwind CSS Support: Optionally includes Tailwind CSS setup during the Next.js project creation.
  • Express Server: Includes a basic Express server setup with routing, ready for customization.

Installation

You can install create-next-xpres globally to use it as a CLI tool:

npm install -g create-next-xpres@latest

Or use it directly with npx:

npx create-next-xpres@latest

Usage

  1. Run the CLI: Start by running the CLI command:

    npx create-next-xpres@latest
  2. Project Name: Enter the name of your project when prompted. If you don't enter a name, it will default to next-xpres-app. If you enter ., the files will be created in the current directory.

  3. Tailwind CSS: Choose whether to include Tailwind CSS during the Next.js app setup.

  4. Project Structure: The tool will create a project with the following structure:

    your-project-name/
    ├── client/            # Next.js app
    ├── index.js           # Express server
    ├── connection.js      # MongoDB Connection with Mongoose
    ├── package.json       # Root package.json with Express dependencies
    ├── tailwind.config.js # Tailwind configuration (if Tailwind CSS is selected)
    └── postcss.config.js  # PostCSS configuration (if Tailwind CSS is selected)
  5. Start the Project: After setup, navigate to the project folder and start the development server:

    cd your-project-name
    npm run dev      # Starts the Next.js development server with express using nodemon
    npm start        # Starts the Next.js production server with express

Example

$ npx create-next-xpres
? Enter the name of your project: my-app
? Do you want to use Tailwind CSS? Yes
Running: npx create-next-app@latest client --tailwind
...
Express server setup completed.

Scripts

The package.json includes the following scripts:

  • npm start: Starts the Next.js development server Express server.
  • npm run dev: Starts the Next.js development server with Express server.

License

MIT License

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Author

Raushan Kumar

Acknowledgments