https://github.com/rahul3883/server-logs
View Node.js server logs in browser
https://github.com/rahul3883/server-logs
browser client debug debugger log nodejs npm-package
Last synced: 5 months ago
JSON representation
View Node.js server logs in browser
- Host: GitHub
- URL: https://github.com/rahul3883/server-logs
- Owner: rahul3883
- License: mit
- Created: 2020-05-02T21:46:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T16:05:58.000Z (over 1 year ago)
- Last Synced: 2025-10-19T20:06:17.720Z (8 months ago)
- Topics: browser, client, debug, debugger, log, nodejs, npm-package
- Language: JavaScript
- Homepage:
- Size: 237 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Server logs
View Node.js server logs in browser.
## Install
```shell script
npm install @rahul1711/server-logs
```
## Usage
#### Start the server
```javascript
const serverLogs = require('@rahul1711/server-logs');
serverLogs.configure();
```
#### Log the message
```javascript
serverLogs.log('message');
```
## View logs in browser
Open [localhost:5000](http://localhost:5000) to see the logs.
You can also see the logs in browser console.
## Samples
Sample files can be found in [`/samples`](https://github.com/rahul3883/server-logs/tree/master/samples) directory.
## Notes
- The server runs on port 5000 by default.
- Once the server has started, the log will send a message to all connected clients using web sockets.
- A new client will get the last emitted message upon connecting.