Skip to content

Commit

Permalink
clean up; prep for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
floodfx committed Jan 24, 2022
1 parent 56f13be commit dfdb688
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 129 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
.cache/
.env
dist/
.parcel-cache/
.parcel-cache/
.DS_Store
12 changes: 12 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.parcel-cache/
.vscode/
coverage/
node_modules/
.editorconfig
.eslintrc.js
.gitignore
.gitattributes
.npmignore
jest.config.js
package-lock.json
tsconfig.json
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
"distDir": "dist/examples"
}
},
"source": "src/server/index.ts",
"types": "dist/types/index.d.ts",
"main": "dist/framework/index.ts",
"files": [
"dist/framework/**/*.js"
],
"scripts": {
"examples": "nodemon -e js -w dist dist/examples/index.js",
"preexamples": "npm run build",
Expand Down
4 changes: 3 additions & 1 deletion src/server/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * from "./live_view_server";
export * from "./live_view_server";
export * from "./types";
export * from "./templates";
32 changes: 0 additions & 32 deletions src/server/socket/message_router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,8 @@ import http, { Server, createServer } from 'http';
// import { router } from '../live/router';
import { URLSearchParams } from 'url';
import { LiveViewComponent } from '../types';
import { app } from '../web/index';
import { LiveViewRouter } from '../types';



// const server = new Server();
// const wsServer = new WebSocket.Server({
// server
// });

// // listen for http requests
// server.on('request', app);

// const topicToPath: { [key: string]: string } = {}

// wsServer.on('connection', socket => {
// // console.log("socket connected", socket);

// socket.on('message', message => {

// onMessage(socket, message);

// });
// });


export function onMessage(ws: WebSocket, message: WebSocket.RawData, topicToPath: { [key: string]: string }, router: LiveViewRouter) {

console.log("message", String(message));
Expand Down Expand Up @@ -307,11 +283,3 @@ export function sendInternalMessage(socket: PhxSocket, component: LiveViewCompon
}
});
}

// export { wsServer };

// const port: number = 3002

// server.listen(port, function () {
// console.log(`App is listening on port ${port} !`)
// })
93 changes: 0 additions & 93 deletions src/server/web/index.ts

This file was deleted.

0 comments on commit dfdb688

Please sign in to comment.