Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Redirect to GitHub source
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinkihaveacat committed Feb 5, 2020
1 parent c756e2e commit 5cd1e55
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
12 changes: 9 additions & 3 deletions README.md
Expand Up @@ -2,9 +2,15 @@

## AMPBench: AMP URL Validation and Troubleshooting

IMPORTANT: The hosted version of ampbench at <https://ampbench.appspot.com/>
will be shut down on January 31st, 2020. For more information, please see [issue
#126](https://github.com/ampproject/ampbench/issues/126).
### Status

The hosted version of ampbench was shut down in February 2020. For the rationale
and alternatives, see [issue
\#126](https://github.com/ampproject/ampbench/issues/126).

There are no plans to remove the source code from its canonical location at
<https://github.com/ampproject/ampbench,> but if it is important to you, we
recommend making a copy.

### Guides

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"preinstall": "cd amp-story/linter && npm install",
"start": "node ampbench_main.js",
"start": "node redirect-all.js",
"monitor": "nodemon --watch . --watch views/index.hbs --watch views/results.hbs --ignore 'validator/*.*'",
"deploy": "gcloud app deploy app.yaml",
"lint": "eslint --quiet amp*.js",
Expand Down
16 changes: 16 additions & 0 deletions redirect-all.js
@@ -0,0 +1,16 @@
"use strict";

const http = require("http");

const PORT = process.env.PORT || 8080;

const server = http.createServer((req, res) => {
res.statusCode = 301;
res.setHeader('Location', 'https://github.com/ampproject/ampbench#status');
res.setHeader('Content-type', 'text/plain');
res.end('See https://github.com/ampproject/ampbench#status');
});

server.listen(PORT, () => {
console.log(`App listening on port ${PORT}`);
});

0 comments on commit 5cd1e55

Please sign in to comment.