Setup server redirect from www to root

This commit is contained in:
Bruno Lemos
2018-11-15 21:05:38 -02:00
parent 921ab54040
commit 4fcca6160d
5 changed files with 26 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "devhub",
"alias": ["www.devhubapp.com", "devhubapp.com"],
"alias": "devhubapp.com",
"builds": [
{ "src": "packages/web/dist/**", "use": "@now/static" }
],

View File

@@ -0,0 +1,4 @@
module.exports = (req, res) => {
res.writeHead(301, { Location: `https://devhubapp.com/${req.url.substr(1)}` })
res.end()
}

View 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
}

View File

@@ -0,0 +1,5 @@
{
"name": "devhub-www",
"version": "1",
"license": "MIT"
}

View File

@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1