this example use three type of websocket server implementation
socket.io and sockjs are all implements a weird, arbitrary layer over the WebSocket protocol, which need server side support.
sockjs https://github.com/sockjs/sockjs-node
raw websocket server https://github.com/websockets/ws
socket.io https://github.com/socketio/socket.io (did not work, no error, no request if use path option, the api is not good)
https://github.com/websockets/ws
Server connect to Echo test see http://websocket.org/echo.html
HTML5 https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/dev-guides/hh673567(v=vs.85)
https://github.com/sockjs/sockjs-client
https://github.com/socketio/socket.io-client (the path option did not work)
https://stackoverflow.com/questions/5510537/websocket-library-for-browsers
use proxy to access express server
proxy also work with websocket protocol
npm run dev
cd src/client
npm start
Server side rendering by nuxt.js associating with expressjs
using AdminLTE which depend on bootstrap@3 and jquery
create with templateexpress-template
it works much better than next.js and have better document for now. But..., still a tentative way to me. Have not much confidence to use it in real production.
- the eslint --fix did not fix the error, so I ignore all the source in the .eslintignore
go the folder, run npm install
then run npm run dev
Server side rendering by next.js associating with expressjs
using AdminLTE
I have the problem as same as nextjs custom server build size is too big
- after
npm build
, thennpm start
which with NODE_ENV = production, the main.js is still 1.2M, and there are hot reloading, it seems the production env did not work. - there are not much resource to find the answer to resolve the problem.
so for now, I will not update the example until there are more progress of the popularity of the next.
please see the shell run-dev.sh, change the environment variable in the shell then run from the meteor project folder
bash ./run-dev.sh
subscribe to mongolist, render with react and Tracker.autorun.
use methods to update.
subscribe to mongolist, render with withtrack.
use methods to update.
subscribe to customer collection, which actually is a local collection
show how to use meteor accounts-password to login
show how to use meteor accounts-password to create a new user by email and password
show how use mongo dirver 3.1 api to do transaction, it will make the publication know the change, but there will be an obviously time gap and the meteor native collection will not affected by the transaction as they are in another database connection. NOTE:as transaction only work in a replica set(mongo 4.0). so will have error like Transaction numbers are only allowed on a replica set member when you run in local machine with one mongo node.
show how to apply theme layout of Material Dashboard, also show do logout of the account
tried local collection without mongodb, it will not publish the change across the connections as each collection is a local collection.
So, use mongodb if you using meteor, otherwise, most feature dispear!!!
see aldeed/meteor-collection2-core#30,
just remove aldeed:simple-schema from .meteor/packages and .meteor/versions
and import:
import SimpleSchema from 'simpl-schema';
instead
refer to this article
I add a promise case.
go into folder es6-examples
npm i
npm start ./trampoline/recursion-single.js
refer to this article ES modules: A cartoon deep-dive
but we should not mess our code up like such a require relation.
go into folder misc_examples\src\module_cycle_require
node .\m_a.js
Nodejs Brotli Compression
This require conda to use nodejs11
conda create -n nodejs11
conda activate nodejs11
conda install -c conda-forge nodejs
go into folder misc_examples\src\nodejs11
conda activate nodejs11
node .\brotli.js
Inspired by 10 lines implemention of hooks
A implementation of Reat Hooks
Also include implementation of Redux
npm install
npm test
inspired by https://github.com/Akryum/apollo-server-example
inspired by https://github.com/Akryum/vue-apollo-example
copy from https://github.com/prisma-labs/nexus
copy from https://github.com/prisma/prisma-examples
copy from https://github.com/areslabs/alita