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

basicwebchat

v1.0.1

Published

"Basic chat room functional on the local intranet, made for the practice of websockets with nodejs server."

Downloads

3

Readme

basicwebchat

This is a basic web room functional over an local intranet, made using WebSockets and Node.js, for practice.

Usage

basicwebchat works only on an local intranet, i.e. all the users should be connected to the same internet connection. (This is because I have implemented a local Node.js server that handles all the requests and responses)

Among all the users, one user has to act as the server and will have to follow these steps in order to host the local server :-

Download Node.js

You will need Node.js and npm installed on your system. If you already have Node.js installed on your system, move to the next step.

To download Node.js using Terminal:

sudo apt-get install nodejs

Or Visit nodejs.org for more info about the installation.

Install basicwebchat via npm

Install basicwebchat via npm (Node Package Manager) Make sure that you are at the root directory of your system.

npm install basicwebchat

If you didn't have any other previously installed node packages, then this command should create a node_modules folder in your root directory, but if you are already using Node.js and have other packages installed, then the node_modules folder already exists.

Starting your local server

cd node_modules/basicwebchat
npm install
node webchat.js

This will make your system a local server that will handle all the other clients using the chat room.

Opening the chat room

In the node_modules/basicwebchat folder, you will find index.html file. Run this in your preferred web browser.

How can others on the same internet connection join my chat room

There are 2 ways by which anyone on the same internet connection as the server can join the chat room:-

1. Using locally downloaded HTML file

Follow the same steps as above, except Starting your local server Instead, directly open the index.html file as mentioned in Opening the chat room. This method works for users with laptops/pcs, but not for users on handhelds (mobiles,tables,etc.)

2. Using locally hosted files by the user who made the server

The user who made the local Node.js server, can create another local server and host his/her system files. Files can be hosted using NodeJS local server, Apache Server, or any other server. (I personally prefer NodeJS server). Once the files are hosted, other users can run the ip address of the localserver, then navigate to the node_modules/basicwebchat/ folder and run the index.html file. This method works for users on both laptops/pcs and handhelds.

Note:- The user who hosts his/her system files should be careful as other users can view all the content on his/her system that has been hosted over the local server

How to use the Chat Room

When you enter the chat room, i.e open the index.html file, it will ask you for your local internet ip address. If you don't know your ip, you can find it typing this in your terminal:-

hostname -I

This will give an output something like:-

192.168.x.x something something

You only need the 192.168.x.x part. Enter this when asked. (This remains same for all the users in the same chat room)

And you are done!

Pointing out bugs/issues and suggesting possible improvements

This is a basic project made for practice and may contain bugs. You can open an issue in the github repository itself, or mail me your suggestions at [email protected]