pervane
pervane copied to clipboard
Porting to node.js web server
@hakanu, in addition to Rewrite UI with vue.js, do you have a list of other major refactor that might happen?
I am asking because of currently porting the original Flask/python server to node.js
- status: roughly 70% ported (559 lines of js code, vs 793 lines of py code), but only 20~30% tested
- might pending some non-essential features, because not easy to find js counter parts
- [ ] user account
- [ ] cache
- [ ] check_updates
- the effort for go server port is under survey
Dependencies:
- Expresss as node.js server
- Nunjucks for templating => possible to 100% rely on vue.js ?
- Yargs for parsing command line arguments
- fast-glob for file pattern match/ignore
Before my node.js port getting stable, below are some further details to share at this moment
some files on dropbox
- serve-js.js - https://www.dropbox.com/s/9g4ocmkl3wda3av/serve-js.js?dl=0
- package.json - https://www.dropbox.com/s/9eox14oyfiz5y15/package.json?dl=0
And, this might be my candidate for Hackable (Scriptable) Markdown Wiki mentioned in Google Group
Hey @Eucaly thanks for the note.
do you have a list of other major refactor that might happen?
I don't think so. Everything is pretty stable now. Mostly the features are going to be added through js code. Server doesn't change that often.
I am asking because of currently porting the original Flask/python server to node.js
Big question here is why? :) I'm happy to accept contributions to the project. If you see something is missing, let me know, either I can try to add or you can add. Rewriting server in nodejs or go does not seem adding too much value apart from having a compelling reason which I'm not aware. (well go may be able to do faster file tree generation but this matters if you have 1000s of files; I don't have any issues with my 4000 note files)
Hackable (Scriptable) Markdown Wiki
What kinda hackability do you need? There is this project where you can write js scripts to change editor behavior: https://github.com/zadam/trilium
porting the original Flask/python server to node.js
- working on it to realize how it works, and my experience on js (2007 ~ now) is much more than py (~ 1 month in 2016, not continued).
- might benefit people to use pervane with js only
- and for go, pervane server porting might be a good exercise for me (experience: go < py << js), 793 lines of code, not too small or too big
What kinda hackability do you need?
- pity trilium is not native Markdown & file system store
- for example, embedmd: embed code (or other text) into markdown (with regexp)
- others are mentioned in Hackable section of my target for Hackable (Scriptable) Markdown Wiki (wish list) at https://github.com/beZong/bzWiki/blob/master/doc/bzWiki-spec.md
p.s. my target Markdown Wiki might be closed to vscode-crossnote
I'm still not sold on the idea to rewrite the server but go for it if you feel like it. Note taking apps are always a good practice to brush up skills.
Code smallness would have been compelling if there was a significant improvement. But 559 lines of js code (without login), vs 793 lines of py code seems like almost same. Anyways, it's up to you :)
might benefit people to use pervane with js only
What does this mean?
p.s. my target Markdown Wiki might be closed to vscode-crossnote
Doesn't work in the browser. So i will pass this on. I want to be able to edit my files in my phone/tablet etc.
for example, embedmd: embed code (or other text) into markdown (with regexp)
Way too much complexity tbh for an md editor.
vscode-crossnote is just an example, I also agree that in browser might be more general purpose.
I guess, you target for Note taking, and me for personal Wiki and hackability. They are some how different.
Finally, I address my ideas more clear in below. For your reference. https://github.com/beZong/bzWiki