trucoshi 0.2.18 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,2 @@
1
- declare const _default: () => void;
2
- export default _default;
3
1
  export * from "./lib";
4
2
  export * from "./types";
package/dist/index.js CHANGED
@@ -14,19 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- const classes_1 = require("./server/classes");
18
- const trucoshiEvents_1 = require("./server/middlewares/trucoshiEvents");
19
- exports.default = () => {
20
- const PORT = process.env.NODE_PORT || 4001;
21
- const ORIGIN = process.env.NODE_ORIGIN || "http://localhost:3000";
22
- const server = (0, classes_1.SocketServer)((0, classes_1.Trucoshi)(), Number(PORT), [ORIGIN]);
23
- server.listen((io) => {
24
- console.log("Listening on", PORT, " from origin at", ORIGIN);
25
- io.use((0, trucoshiEvents_1.trucoshiEvents)(server));
26
- io.on("connection", (socket) => {
27
- console.log("New socket", socket.id);
28
- });
29
- });
30
- };
31
17
  __exportStar(require("./lib"), exports);
32
18
  __exportStar(require("./types"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "0.2.18",
3
+ "version": "0.3.1",
4
4
  "main": "dist/index.js",
5
5
  "license": "GPL-3.0",
6
6
  "scripts": {