Giter VIP home page Giter VIP logo

react-ts-webpack-express-boilerplate's Introduction

boilerplate-ts-express ๐Ÿš€

Fullstack react-express using typescript + webpack

Installation

Use npm or yarn to install and run.

npm install

or

rm package-lock.json && yarn

The post install script will also build the project.

Setup

Optional as the post-build should take of building the project.

npm run build 

or

yarn build

The build script builds the client and server from the TypeScript source code See scripts for more options, including a prod build.

Usage

Development:

npm run dev

or

yarn dev

Production:

npm run start 

or

yarn start

Details

File tree

Expand to see file tree

boilerplate-ts-express/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ client/
โ”‚   โ”‚   โ”œโ”€โ”€ actions/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ index.ts
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ client.ts
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AddWord.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ App.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Price.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Word.tsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Words.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ reducers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ words.ts
โ”‚   โ”‚   โ”œโ”€โ”€ index.tsx
โ”‚   โ”‚   โ””โ”€โ”€ tsconfig.json
โ”‚   โ””โ”€โ”€ server/
โ”‚       โ”œโ”€โ”€ api/
โ”‚       โ”‚   โ””โ”€โ”€ coingecko.ts
โ”‚       โ”œโ”€โ”€ public/
โ”‚       โ”‚   โ”œโ”€โ”€ images/
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ favicon.ico
โ”‚       โ”‚   โ”œโ”€โ”€ stylesheets/
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ index.scss
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ normalize.css
โ”‚       โ”‚   โ””โ”€โ”€ index.html/
โ”‚       โ”œโ”€โ”€ routes/
โ”‚       โ”‚   โ”œโ”€โ”€ api.ts
โ”‚       โ”‚   โ””โ”€โ”€ index.ts
โ”‚       โ”œโ”€โ”€ index.ts
โ”‚       โ”œโ”€โ”€ server.ts
โ”‚       โ””โ”€โ”€ tsconfig.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ readme.md
โ””โ”€โ”€ webpack.config.ts

Scripts

Expand to see scripts

{
  "scripts": {
    "postinstall": "npm run build",
    "start": "node server dist/server/index.js",
    "build": "run-p build:client build:server",
    "build:watch": "tsc --build ./ --watch",
    "build:client": "tsc --build ./src/client",
    "build:watch:client": "tsc --build ./src/client --watch",
    "build:server": "tsc --build ./src/server",
    "build:watch:server": "tsc --build ./src/server --watch",
    "dev": "run-p build:watch:client build:watch:server dev:client dev:server",
    "dev:client": "npm run webpack -- --watch",
    "dev:server": "nodemon --watch server dist/server/index.js",
    "webpack:prod": "npm run webpack -- --mode production",
    "webpack": "webpack --config ./webpack.config.ts",
    "lint": "eslint --fix --ext .js,.jsx,.ts,.tsx ./src"
  },
}

Linter

Expand to see linter details

{
  "env": {
    "browser": true,
    "es2021": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "standard",
    "prettier"
  ],
  "settings": {
    "react": {
      "version": "detect"
    }
  },
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": 12,
    "sourceType": "module"
  },
  "plugins": [
    "react",
    "@typescript-eslint"
  ],
  "ignorePatterns": [
    "./server/bin/www"
  ],
  "rules": {
    "no-use-before-define": 0
  }
}

react-ts-webpack-express-boilerplate's People

Contributors

bosh-code avatar dependabot[bot] avatar ryanbosher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.