Merge pull request #1 from BRAVO68WEB/Dev

Update index.js
This commit is contained in:
Jyotirmoy Bandyopadhayaya 2020-10-27 11:27:48 +05:30 committed by GitHub
commit d699d4ae64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View File

@ -2,6 +2,19 @@
An Custom Build Link Shortener build with Cloudflare Workers
![CFW Logo](https://github.com/DFCommunity/img-stack/blob/master/cfw.png?raw=true)
## Status Badges
![atb1](https://flat.badgen.net/badge/Build-With/CloudFlare%20Workers/orange)
![atb2](https://img.shields.io/badge/Build%20Framework-NodeJS-green??style=for-the-badge&logo=node.js)
![Deploy to CF Workers](https://github.com/BRAVO68WEB/url-short-cfw/workflows/Deploy%20to%20CF%20Workers/badge.svg)
![Node.js CI](https://github.com/BRAVO68WEB/url-short-cfw/workflows/Node.js%20CI/badge.svg)
## Project Structure
```
@ -25,3 +38,4 @@ To generate using [wrangler](https://github.com/cloudflare/wrangler)
```
wrangler generate <your-project-name> https://github.com/BRAVO68WEB/url-short-cfw
```

View File

@ -14,9 +14,22 @@ async function handleRequest(request) {
})
else
return new Response(
'<html><head><ttile>DF Community URL Shortner</title></head><body>404 not found !! Check all possible at https://links.dfcommunity.win/all-urls</body></html>',
`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DF Community URL Shortner</title>
</head>
<body>
404 not found !! Check all possible at
https://links.dfcommunity.win/all-urls
</body>
</html>
`,
{
status: 404,
headers: { 'content-type': 'text/html' },
},
)
}