Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting to node.js web server #98

Open
3 tasks
Eucaly opened this issue May 24, 2020 · 4 comments
Open
3 tasks

Porting to node.js web server #98

Eucaly opened this issue May 24, 2020 · 4 comments

Comments

@Eucaly
Copy link

Eucaly commented May 24, 2020

@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

And, this might be my candidate for Hackable (Scriptable) Markdown Wiki mentioned in Google Group

@hakanu
Copy link
Owner

hakanu commented May 25, 2020

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

@Eucaly
Copy link
Author

Eucaly commented May 26, 2020

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?

p.s. my target Markdown Wiki might be closed to vscode-crossnote

@hakanu
Copy link
Owner

hakanu commented May 26, 2020

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.

@Eucaly
Copy link
Author

Eucaly commented May 30, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants