Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Latest commit

History

History
70 lines (46 loc) 路 1.2 KB

File metadata and controls

70 lines (46 loc) 路 1.2 KB

Deployment Guide

Make sure your web server rewrites all requests to '/' index.html

since react is a SPA (single page application) and we're using client-side routing to make multi pages available

Vercel:

vercel deployment is supported

// package.json scripts:
  yarn vercel dev //vercel development serverless in local
  yarn vercel //preview deploy
  yarn vercel --prod //production deploy

Express:

app.get('/*', function (req, res) {
  res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});

Apache:

// .htaccess
    Options -MultiViews
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.html [QSA,L]

http-server (npm package)

http-server -o --proxy http://localhost:8080?

gh-pages

// package.json
  "homepage": "https://website.com",

Netlify

create this file at src: _redirects /* /index.html 200

Cloudflare pages

... @todo

Aws

... @todo