commit
d699d4ae64
14
README.md
14
README.md
|
@ -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
|
||||
```
|
||||
|
||||
|
|
15
index.js
15
index.js
|
@ -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' },
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue