npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

public-server-api

v1.0.2

Published

Client of PublicServer API , that will make u can do some must have an server thing like as send a truly http request just in front-end and browser now!

Downloads

191

Readme

PublicServer Client

The client of PublicServer API.
My english is not well, i am sorry.

what is PublicServer API

PublicServer is an free API for all front-end and localapp coder to do some thing that must have an server, like as send an truly http request or write a vote site.
The all func of PublicServer isnt need an key or signup at now, so u don't need do anything. Just request it, that's no problem.
PublicServer API is currently maintained by N-Project( it's formed by me ), but infact this project just has one coder that's my own(host use my vercel, I am no full money to buy an host server because I am a student), my friends provide that domain:(.
If u like this project, u can sponsor me on WeChat with CNY:(

Document

~~Do you think I talk too mach, I think so~~
Let's go, my favorite func that is We can use API to send truly http request now.
Here is an simple example

(async function(){
  var myserver = new PublicServer()
  alert( await myserver.cat( "https://example.com" ))
  // a easy way to get site body as string
  
  // The another way
  var response = await myserver.request( "https://example.com" )
  // a response object same as fetch will be returned
  alert( await response.text() )
})()

And I made a mail api (SMTP), that will help u send an email in front-end

var myserver = new PublicServer()
myserver.mail( {
   host: "smtp.xxx.com",
   uname: "[email protected]",
   pw: "password",
   subject: "TestEmailAPI",
   to: "[email protected]",
   body: "<b>body of your mail with html support</b>"
}).then( ( data ) => {
   if( data.statu === "error" ){
      console.table( data.error )
   } else {
      console.log( data.statu )
   }
})

Ip API example

var myserver = new PublicServer()
// If this way always return 127.0.0.1, please use `new PublicServer( "https://pubilc-server-guw1n1jm4-love-kogasas-projects.vercel.app" )`
myserver.ip().then( dt => console.log( dt.ipv4 ) )
// "dt" is an object contain ip and ipv4

Counter API example

var myserver = new PublicServer()
myserver.number( false ).then( console.table )
// get all counter
myserver.number( true, "test" ).then( console.log )
// get counter by id "test"
myserver.number( true, "xxx.xxx.com testnumber", 5 ).then( console.log )
// Register a counter(if this id isnt be registered) and increase 5

By the way, please use "xxx.com id" like format to register your counter id. Because emmm... u know.

At present, there are only these contents, but I will gradually add more. awa