Skip to content

imPrk0/ypay_plan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yPay Plan Task

yPay monitoring page. Monitor the best pages with the best performance!

© Powered by Prk

Use Tutorial

1) Download the latest release package (.zip).

Go to the release version of the project page on GitHub and download the latest version.

2) Upload the release package to the server and unzip.

I don’t need to say too much, everyone will! Of course, you can also choose to unzip and upload. :)

3) Configure server software (e.g: Nginx, Apache).

Nginx

location / {
  try_files $uri $uri/ /index.html;
}

Apache

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

Instead of mod_rewrite, you could also use FallbackResource.

Node.js

const http = require('http')
const fs = require('fs')
const httpPort = 80

http.createServer((req, res) => {
  fs.readFile('index.html', 'utf-8', (err, content) => {
    if (err) {
      console.log('We cannot open "index.html" file.')
    }

    res.writeHead(200, {
      'Content-Type': 'text/html; charset=utf-8'
    })

    res.end(content)
  })
}).listen(httpPort, () => {
  console.log('Server listening on: http://localhost:%s', httpPort)
})

4) U R WIN !!

See here, you can visit your site for testing!