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-express-react-app

v1.0.2

Published

Generator module to create a basic project based on React and Express.js

Downloads

1

Readme

Create Express React App

This is a project generator that allows to create your own web application based on Express.js and React. Every new project is created starting from a template using Webpack to create the client bundle that is served by Express.js on the backend. The goal of this package is to have a quick start when configuring a new project using this stack. The output project has a basic and mainly used set of configurations.

Getting Started

Installing

To globally install the package:

npm install -g create-express-react-app

Now to create a new my-project app just run:

create-express-react-app my-project

This will create a my-project folder in the current path that contains all the files of the basic structure of the app. Inside the new created folder install the dependencies:

cd my-project
npm install

Usage

The project template provides the following scripts to create production build and dev environment:

# Production build served by Express
npm run start

# Production build (no server running)
npm run build

# Dev build with webpack-dev-server serving the front-end
npm run dev

# Dev build with webpack-dev-server serving the front-end and live reloading on backend
npm run watch

# Dev build (no live reload and no server running)
npm run debug

# Run the server
npm run server

What’s Included?

  • Babel: configured with @babel/preset-react and @babel/preset-env to transpile ES2015 code using core-js@3 to handle polyfills.
  • Webpack: project build is available for development mode in webpack.dev.js and for production mode in webpack.prod.js; options shared between them are defined in webpack.common.js config file. Such configurations allow to import:
    • js file: import App from './src/App';
    • css module: import css from './App.css';
    • base64 images: import myImage from '../public/icon.png';
  • Webpack-dev-server: a development server to test the frontend is available with live reloading feature enabled. It implements a proxy for the API requests that are sent to the backend URL to the Express server.
  • Nodemon: the backend code is live reloaded upon any changes with nodemon tool.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments