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

tdubs-express-react-template

v1.0.0

Published

Express server with basic routes ready to deploy on Heroku. Uses express, helmet, and knex for the backend. Uses react and axios for the frontend.

Downloads

6

Readme

tdubs-express-react-template


Full-stack template for an:

  • express server protected by CORS and helmet
  • DB and REST API functionality powered by knex and sqlite3
  • a frontend served up with React and axios

npm npm NPM

Installation

Use npm or yarn to install tdubs-express-react-template

npm i tdubs-express-react-template

Usage

You will want to change "category" with whatever relates to your project. Following are the files that will need updating ( I prefer using ctrl + F and selecting all in a file to replace ) :

  • src/knexfile.js (db name)
  • src/category (dir name)
  • src/category/category-middleware.js
  • src/category/category-model.js
  • src/category/category-router.js
# install all server dependencies
cd src
npm i

# initiate eslint 
npx eslint --init

? How would you like to use ESLint?
  To check syntax only
> To check syntax and find problems
  To check syntax, find problems, and enforce code style
  
? What type of modules does your project use?
  JavaScript modules (import/export)
> CommonJS (require/exports) 
  None of these
  
  # even though we will be using React
? Which framework does your project use?
  React
  Vue.js
> None of these

? Does your project use TypeScript?
> No
  Yes
  
? Where does your code run? …  (Press <space> to select, <a> to toggle all, <i> to invert selection)
> Browser
> Node

? What format do you want your config file to be in?
  JavaScript
  YAML
> JSON

# install all client dependencies
cd client
npm i

# initiate eslint for frontend
npx eslint --init

? How would you like to use ESLint?
  To check syntax only
> To check syntax and find problems
  To check syntax, find problems, and enforce code style
  
? What type of modules does your project use?
> JavaScript modules (import/export)
  CommonJS (require/exports) 
  None of these
  
? Which framework does your project use?
> React
  Vue.js
  None of these

? Does your project use TypeScript?
> No
  Yes
  
? Where does your code run? …  (Press <space> to select, <a> to toggle all, <i> to invert selection)
> Browser
  Node

? What format do you want your config file to be in?
  JavaScript
  YAML
> JSON

# The config that you've selected requires the following dependencies:
eslint-plugin-react@latest eslint@latest

? Would you like to install them now with npm?
  No
> Yes

# run server
cd src
npm run server

# run frontend
cd client
npm start

# frontend tests done with cypress
npm test

Don't forget to grab a taco after all of that hard work!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT