https://github.com/eduhcastro/trade-items
A User X User item exchange system.
https://github.com/eduhcastro/trade-items
expressjs items javascript nodejs trade websocket
Last synced: 9 months ago
JSON representation
A User X User item exchange system.
- Host: GitHub
- URL: https://github.com/eduhcastro/trade-items
- Owner: eduhcastro
- License: mit
- Created: 2021-04-19T15:22:10.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T02:43:10.000Z (about 3 years ago)
- Last Synced: 2025-07-06T08:06:12.521Z (10 months ago)
- Topics: expressjs, items, javascript, nodejs, trade, websocket
- Language: JavaScript
- Homepage:
- Size: 17.6 MB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Trade Items
An item exchange system using LowDB and Socket.io
## How to use :rocket:
The System does not exist login, you can access the trade using 2 parameters
```sh
http://yourdomain.com/trade?session=yKgyjt3jp6WT5ZQvUGWSvJmnCMu8c9r2&user=skillerm22
```
### Details
1. session: It would be the session url, you can see/add the sessions in (Session-PB.json) file
2. user: user that will be used in the session, you can see/add users in the (Users-PB.json) file
Alert: Change the url to the url the system will run on. File (Socket.js)🎮
```JS
module.exports = function(io, chalk, Getting, ClassPB) {
io.sockets.on('connect', function(socket) {
var Stringg = socket.handshake.headers.referer
try {
var Sessao = Stringg.split("https://trade-castroms.herokuapp.com/trade?session=")
var Splitado = Sessao[1].split("&user=")
var SessaoCorreta = Splitado[0]
var UsuarioCorreto = Splitado[1]
} catch (e) {
var Sessao = Stringg.split("https://trade-castroms.herokuapp.com/trade?user=")
var Splitado = Sessao[1].split("&session=")
var SessaoCorreta = Splitado[1]
var UsuarioCorreto = Splitado[0]
}...
```
## Test 🎮
You can test the system online.
User 1: https://trade-castroms.herokuapp.com/trade?session=yKgyjt3jp6WT5ZQvUGWSvJmnCMu8c9r2&user=eduhcastro19
User 2: https://trade-castroms.herokuapp.com/trade?session=yKgyjt3jp6WT5ZQvUGWSvJmnCMu8c9r2&user=skillerm22
Preview: https://www.youtube.com/watch?v=Qt3DMaXTAH0
## Contributing
This project is free, and any contribution is welcome.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Eduardo Castro - [Facebook](https://www.facebook.com/eduhcm)
CastroMS#3430 - [Discord]