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-lite

v1.1.3

Published

Simplifies the process of setting up a new project using Node.js, Express, and Mongoose and REST API's.

Downloads

11

Readme

Create Express Lite

Simplifies the process of setting up a new project using Node.js, Express, and Mongoose and REST API's.

By running a single command, you will get a production-ready Node.js app installed and fully configured on your machine. The app comes with many built-in features, such as authentication using JWT, request validation, allowing you to focus on building your application rather than dealing with the initial configuration.. For more details, check the features list below.

  • Setting up Express app – How to setup an express app using create-express-lite.
  • Create Express Lite works on macOS and Windows.
  • If something doesn’t work, please file an issue.

Quick Overview

npx create-express-lite my-app
cd my-app
npm run dev

If you've previously installed create-express-lite globally via npm install -g create-express-lite, you can aslo create the app using create-express-lite my-app.

If you are running in development environment the app will be running at http://localhost:3000.

Creating an App

To create a new app, you may choose one of the following methods:

npx

npx create-express-lite my-app

npm

npm i create-express-lite
create-express-lite my-app

It will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure and install the transitive dependencies:

my-app/
│
├── config/
│   ├── config.js
│   ├── database.js
│   ├── logger.js
│   ├── email.config.js
│   └── ...
│
├── controllers/
│   ├── authController.js
│   └── ...
│
├── middlewares/
│   ├── error.js
│   ├── validate.js
│   └── ...
│
├── models/
│   ├── User.js
│   ├── plugins
│       └── toJSON.plugin.js
│
├── routes/
│   ├── authRoutes.js
│   └── ...
│
├── services/
│   ├── userService.js
│   ├── authService.js
│   ├── emailService.js
│   └── ...
│
├── templates/
│   ├── emailTemplates/
│   └── ...
│
├── utils/
│   ├── apiError.js
│   ├── async.js
│   ├── errorMessage.js
│   ├── pick.js
│   └── ...
│
├── validations/
│   ├── authValidations.js
│   ├── customValidations.js
│   ├── validationHelper.js
│   └── ...
│
├── .env
├── .eslintrc.json
├── .gitignore
├── .prettierrc.json
├── app.js
├── package.json
└── server.js

Once the installation is done, you can open your project folder:

cd my-app

Inside the newly created project, you can run some built-in commands:

npm run dev or npm run prod

Runs the app in development mode. The app will be available at http://localhost:3000 and is up and running.

The page will automatically reload if you make changes to the code when in development environment. You will see the build errors and lint warnings in the console.

User Guide

You can find detailed instructions on using Create Express Lite and many tips in its documentation.

What’s Included?

Your environment will have everything you need to build a express application:

  • NoSQL database: MongoDB object data modeling using Mongoose
  • Validation: request data validation using Joi
  • Logging: logging using winston
  • Error handling: centralized error handling mechanism
  • Dependency management: with npm
  • Environment variables: using dotenv
  • Security: set security HTTP headers using helmet
  • CORS: Cross-Origin Resource-Sharing enabled using cors
  • Compression: gzip compression with compression
  • Git hooks: with husky
  • Linting: with ESLint and Prettier

The tradeoff is that these tools are preconfigured to work in a specific way. If your project needs more customization, you can customize it, but then you will need to maintain this configuration.

Contributing

If you encounter any issues, have suggestions, or want to contribute to create-express-lite, please check out the contribution guidelines.

License

Create Express Lite is open source software licensed as MIT

Happy coding with create-express-lite