Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aalemayhu/isun
Check if a website is using Netlify
https://github.com/aalemayhu/isun
jamstack netlify
Last synced: 3 months ago
JSON representation
Check if a website is using Netlify
- Host: GitHub
- URL: https://github.com/aalemayhu/isun
- Owner: aalemayhu
- License: mit
- Archived: true
- Created: 2018-12-31T00:29:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-01T19:32:16.000Z (about 6 years ago)
- Last Synced: 2024-09-26T00:35:40.946Z (4 months ago)
- Topics: jamstack, netlify
- Language: JavaScript
- Size: 85 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![isun - Is Using Netlify?](./logo.png)
[![Build Status](https://travis-ci.org/scanf/isun.svg?branch=master)](https://travis-ci.org/scanf/isun) [![npm version](https://badge.fury.io/js/%40scanf%2Fisun.svg)](https://badge.fury.io/js/%40scanf%2Fisun)
Check if a website is using Netlify by reading the HTTP server header field.
## Installation
npm install --save @scanf/isun
## Usage as module
```js
const url = "https://jamstack.xdp.no/";require("@scanf/isun").IsUsingNetlify(url, isun => {
assert.equal(true, isun);
});
```## Usage as Lambda function on Netlify
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/scanf/isun)
Assuming you have deployed on Netlify and your domain is `example.xyz`, the below should work:
```js
curl https://example.xyz/.netlify/functions/isun?url=https://google.com
```The function expects you to set the query parameter `url` and be compliant with [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt). Or simply put pass
a valid url and remember to include `https://` prefix :wink:## LICENSE
The project uses a MIT license for all files unless otherwise specified.
The project logo was created using the awesome [logo-maker](https://logo-maker.egoist.sh/) from [egoist/logo-maker](https://github.com/egoist/logo-maker).