Code Monkey home page Code Monkey logo

vl24h-code-base's Introduction

CodeBase Frontend SieuViet

Install [Yarn or Npm]

~ $ yarn install

## Replace - env.example -> .env
Run dev
~ $ yarn start:dev 
Run Production
   ~ $ yarn build
   ~ $ yarn start 

Script in package.json:

"start:dev": "nodemon", // Run dev
"build": "next build && tsc --project tsconfig.server.json", // Build Before Run Production
"start": "cross-env NODE_ENV=production node dist/index.js", // Run on Production 
"lint": "eslint './{src,pages,server}/**/*' --ext .tsx,.ts",
"pretty": "prettier --write --config .prettierrc.js {src,pages,server}/**/*.{ts,tsx}",// Format Code
"format": "npm run lint -- --fix", // Fix Eslint
"analyze": "cross-env BUNDLE_ANALYZE=both npm run build", // Phân tích dung lượng thư viện
"export": "cross-env NODE_ENV=production next export", // Build ra file tĩnh
"cli": "pankod-cli add" // CLi add new Page , Component

Features

Update new Stack

  • Next.js - Server Side Render x2 Performance so với Client Side Render...
  • Typescript - OOP , Giống PropsType React dùng để Validate props trong component...
  • Redux - Quản lý State.
  • Express.js- Node.js framework chạy Server trong Next.js.
  • Built-in Project CLI- Tạo Page + Component giống Artisan Laravel.
  • Sass/Scss - CSS top-level.
  • Babel - Dùng để biên dịch JavaScript.
  • ESLint - Ràng buộc syntax , chuẩn hóa code các thành viên trọng team.
  • next-runtime-dotenv - Support .env in Next.js.
  • next-i18next - Support multi lang.
  • PWA + Service Worker - Chạy trên Thiết Bị Di Động , Chạy Khi Offline cache...

~ $ npm run cli
Document

####Resolution order Next js On the server:

    1. app.getInitialProps
    1. page.getInitialProps
    1. document.getInitialProps
    1. app.render
    1. page.render
    1. document.render
  • On the server with error:
    1. document.getInitialProps
    1. app.render
    1. page.render
    1. document.render
  • On the client
    1. app.getInitialProps
    1. page.getInitialProps
    1. app.render
    1. page.render

License

Licensed SieuViet@DevTeam

vl24h-code-base's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

delta94

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.