GithubHelp home page GithubHelp logo

react-ssr-platforms's Introduction

SSR

Server side rendering.

Usage

Development mode:

// 1. Run Node.js 14+
nvm use
// 2. Install requiments
npm install
// 3. Start the project
npm run dev

Production mode:

// 1. Run Node.js 14+
nvm use
// 2. Install requiments
npm install
// 3. Build project
npm run build
// 4. Start project
npm run start

If you don't have NVM, install it.

File structure

build/                          # Server bundle
configs/                        # Different configs (StyleLint, TsLint)
docker                          # Docker instructions
docs/                           # Docs
public/                         # Client bundle
scripts/                        # Оffline scripts for database modification, index creation, etc.
server/                         # BFF
    ├── lib/                    # Libs for routers
    ├── middlewares/            # Middlewares
    ├── routers/                # Express routers API
    │    ├── v1/
    │    │    ├──android.ts
    │    │    ├──ios.ts
    │    │    └──web.ts
    │    └── common.ts
    ├──app.ts                   # Express app initialization, loading routers
    └──index.ts                 # Input for BFF
src/                            # SSR sources 
    ├── client/
    │   ├── bundles/            # Templates for pages                 
    │   ├── components/         # Components
    │   ├── hooks/              # Hooks
    │   ├── lib/                # Libs
    │   ├── pages/              # Pages
    │   ├── redux/              # States
    │   │    ├── actions/       # Actions 
    │   │    ├── reducers/      # Редьюсеры
    │   │    ├── saga/          # Saga
    │   │    ├── selectors/     # Redux selectors
    │   │    ├── state.ts       # getInitialState
    │   │    └── store.ts       # Store
    │   ├── theme/              # CSS variables
    │   ├── App.tsx             # App component
    │   ├── [email protected]     # Root file of desktop client application
    │   ├── [email protected]      # Root file of mobile client application
    │   └── Routes.ts           # Routes
    └── helpers/
        ├── createStore.ts      # Helper for create store
        └── renderer.tsx        # Helper for render
static/                         # Static files
webpack/                        # Webpack configs
    └── loaders/                # Loaders
tsconfig.json                   # TypeScript config for development
tsconfig.production.json        # TypeScript config for production

Formating

// CSS
npm run format:css
// TS
npm run format:js
// Markdown
npm run format:md

ESLint

npm run eslint

react-ssr-platforms's People

Watchers

 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.