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-e.x.p.r.re.s.s-app

v1.2.27

Published

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![npm version](https://badge.fury.io/js/cea.svg)](https://badge.fury.io/js/cea)

Downloads

53

Readme

CEA (Create Express App)

License npm version

Overview

The CEA (Create Express App) npm package simplifies the setup of a full-stack web application with user authentication. It provides a template Express.js backend and a React frontend, complete with essential middleware for security, authentication, and database interactions. The package aims to streamline the development process, allowing developers to focus on building features rather than dealing with boilerplate code and configuration.

Features

Installation

  1. To reate an Express app, run this command in your project's root folder:

    npx create-e.x.p.r.re.s.s-app

  2. Navigate to the /backend directory and start the server:

    cd backend && npm start

  3. Navigate to the /frontend directory and start the React app:

    cd frontend && npm start

  4. To make changes to the migrations you must unseed and unapply migrations

Configuration

Environment Variables

Environment variables are already included in /backend:

PORT=8000
DB_FILE=db/dev.db
JWT_SECRET=«generate_strong_secret_here»
JWT_EXPIRES_IN=604800
SCHEMA=«custom_schema_name_here»

Database Migration and Seeding

Migrate Database:

Run the following command to perform migrations:

npx dotenv sequelize db:migrate

Seed Database:

Run the following command to seed the database:

npx dotenv sequelize db:seed:all

Unseed Database:

To unseed the database, run:

npx dotenv sequelize db:seed:undo:all

Unmigrate Database:

To unapply migrations, run:

npx dotenv sequelize db:migrate:undo:all

Reapply Migrations and Seeds:

To make changes to migrations, first, unseed and unapply migrations, then reapply and reseed:

npx dotenv sequelize db:seed:undo:all
npx dotenv sequelize db:migrate:undo:all
npx dotenv sequelize db:migrate
npx dotenv sequelize db:seed:all

Deploying to Render:

  1. Create a PostgreSQL Database, name it and choose your region. Copy the Internal DB URL.

  2. Start a new Web Service

  3. Choose your Github repo

  4. Name your web service and choose your region.

  5. Build command

    npm install && npm run render-postbuild && npm run build && npm run sequelize --prefix backend db:migrate && npm run sequelize --prefix backend db:seed:all
  6. Add Environment variables

    PORT=8000
    DB_FILE=db/dev.db
    JWT_SECRET=(click 'Generate')
    JWT_EXPIRES_IN=604800
    SCHEMA=«custom_schema_name_here»
    NODE_ENV=production
  7. Create Web Service