Giter Site home page Giter Site logo

robisim74 / nodejs-mvc Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 2.65 MB

Build a Node.js MVC web app with Webpack, Babel, TypeScript or ES, critical CSS. SEO & performance friendly

License: MIT License

JavaScript 74.55% HTML 13.16% SCSS 2.20% TypeScript 10.08%
nodejs express mvc typescript webpack critical

nodejs-mvc's Introduction

Node.js MVC

Node.js CI

Build a Node.js MVC web app with Webpack, Babel, TypeScript or ES, critical CSS. SEO & performance friendly

Features

  • Express & MVC pattern
  • Handlebars view engine & partial views
  • Helmet for security
  • Babel & webpack to build the client
  • Rollup to build the Express app
  • TypeScript & ES
  • Tailwind
  • CSS, SASS with Autoprefixer
  • Critical CSS
  • HMR & Live reload
  • ES modules
  • Sitemap

Contents

Getting started

Download the code & configure the project in config.js file.

Installation

Node.js 16 or higher is required.

npm install

Start DevServer

npm run dev

Build

npm run build

Project structure

  • App

    • src/ source code folder
      • src/app.ts Express entry point
      • src/app.controller.ts controllers file
      • src/views/ views folder
      • src/routes/ routes folder
        • index.ts client ts file for views/index.html
        • index.scss client css file for views/index.html
    • config.js app configuration
  • Scripts & configuration files

    • build.js building process
      • runs Rollup to build the app
      • runs webpack to generate client bundles
      • runs critical to inline critical CSS
      • runs sitemap to generate sitemap.xml
    • scripts/ scripts used by the building process
    • babel.config.js Babel configuration
    • webpack.config.dev.js webpack configuration for development
    • webpack.config.prod.js webpack configuration for building client bundles
    • rollup.config.js Rollup configuration for building the Express app
    • .browserslistrc target browsers for Autoprefixer
    • postcss.config.cjs PostCSS configuration file to use Autoprefixer & Tailwind
    • tailwind.config.cjs Tailwind configuration
    • tsconfig TypeScript configuration file
    • package.json npm options & scripts

What's new

You can find template changes here.

License

MIT

nodejs-mvc's People

Contributors

robisim74 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.