mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-18 03:58:44 +08:00
Setup server redirect from www to root
This commit is contained in:
2
now.json
2
now.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "devhub",
|
||||
"alias": ["www.devhubapp.com", "devhubapp.com"],
|
||||
"alias": "devhubapp.com",
|
||||
"builds": [
|
||||
{ "src": "packages/web/dist/**", "use": "@now/static" }
|
||||
],
|
||||
|
||||
4
packages/server/www/index.js
Normal file
4
packages/server/www/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = (req, res) => {
|
||||
res.writeHead(301, { Location: `https://devhubapp.com/${req.url.substr(1)}` })
|
||||
res.end()
|
||||
}
|
||||
12
packages/server/www/now.json
Normal file
12
packages/server/www/now.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "devhub-www",
|
||||
"alias": "www.devhubapp.com",
|
||||
"builds": [
|
||||
{ "src": "index.js", "use": "@now/node" }
|
||||
],
|
||||
"routes": [
|
||||
{ "src": "/.*", "dest": "index.js" }
|
||||
],
|
||||
"regions": ["gru1"],
|
||||
"version": 2
|
||||
}
|
||||
5
packages/server/www/package.json
Normal file
5
packages/server/www/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "devhub-www",
|
||||
"version": "1",
|
||||
"license": "MIT"
|
||||
}
|
||||
4
packages/server/www/yarn.lock
Normal file
4
packages/server/www/yarn.lock
Normal file
@@ -0,0 +1,4 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user