Comments (7)
Hi @YashKharel19
I've just run the tests and added support for https. Everything still seems to be passing locally for me.
Can you try the examples in the tests?
from node-http-ping.
Hello @Seikho
My Code:
import ping from 'node-http-ping';
ping('https://google.com', 80)
.then(time => console.log(Response time: ${time}ms
))
.catch(error => console.log(Failed to ping: ${error}
));
output on browser:
https://imgur.com/a/rjj8BmB
from node-http-ping.
This library is only supported in Node. It won't work in the browser as the http and https Node APIs aren't available in the browser.
from node-http-ping.
@Seikho
So is their any other way to implement it? Where does it work ?
from node-http-ping.
It'll work on a NodeJS server.
$ npm install node-http-server
$ + [email protected]
$ node
> require('node-http-server')('google.com').then(console.log)
> ...
> 289
from node-http-ping.
$ node
require('node-http-server')('google.com').then(console.log)
where do you use this code can you please send me the screenshot.
from node-http-ping.
you can always use webpack to compile, put on a site, and ping it using the file :P but, it is a long and tiring setup... mostly if you do not know how webpack functions
from node-http-ping.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-http-ping.