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

pogtopia

v0.3.1

Published

A simple to use API for creating private servers for Growtopia with nodejs.

Downloads

16

Readme

Pogtopia

A simple to use API for creating private servers for Growtopia with nodejs.

Documentation

The documentation here matches the code on the Github repo and not on NPM.

Installations

Requirements

  • node-gyp
  • Python 2.7 (3+ can be used)
  • Windows Build Tools/Build Essential
    • NodeJS v14+
    • MongoDB
    • Redis Server

Installing the Requirements Simply run this as Administrator in Windows Powershell,
$ npm install windows-build-tools node-gyp -g

If on Linux, simply install build-essential first with,
$ sudo (yum/apt-get/etc...) install build-essential

After that, install node-gyp by doing
$ npm install node-gyp -g

After installing everything (windows or linux), simply run
$ npm install pogtopia to install the latest version on NPM, or
$ npm install Alexander9673/Pogtopia to install the version on Github.

Example

const Pogtopia = require("pogtopia");
const { readFileSync } = require("fs");
const server = new Pogtopia.Server({
	server: {
		port: 17091, // set port to 17091,
		cdn: { // CDN Options for the server, this will not be updated, you will have to find the CDN yourselves.
			host: "ubistatic-a.akamaihd.net",
			url: "0098/87996/cache/"
		},
		itemsDatFile: "/path/to/items.dat", // Path to items.dat
		serverDatFile: "/path/to/your/server.dat" // Optional. The path to the server.dat file
	}
});

// uncomment this line to enable the built-in HTTP Server
// Pogtopia.Http.start({ serverIP: "127.0.0.1", serverPort: 17091, httpsEnabled: false });

server.setHandler("connect", (peer) => peer.requestLoginInformation()); // request login information from the peer

server.setHandler("disconnect", (peer) => {}); // handle peer disconnections

server.setHandler("receive", (peer, packet) => {
	// handle packets here
});

server.start();

Check the js/tests/server.js file for a much better example.

Custom Cache

You can implement a custom cache instead of redis.
When implementing your own cache, you have to have these methods with these return types:

public set: (key: string, val: string) => void
public get: (key: string) => any
public del: (key: string) => void
public keys: (pattern: string) => string[]

If you are wondering why the return type for get is any, it's because the value can be anything from js objects, to js arrays. Anything that can be parsed from a JSON string is converted.

Questions

Join our Discord Server about questions.