Hi
Is it possible to deploy this as a web app? If so I am planning to use it inside my intranet.
thanks
Hi
Is it possible to deploy this as a web app? If so I am planning to use it inside my intranet.
thanks
@foxmask is working on one! From what I can tell itβs seems to be working, but they might be able to be more detailed.
It's nice for trying it
Okay, I tried to give it a try :).
$ python3 -m venv joplin-web
$ cd joplin-web/
$ source bin/activate
(joplin-web) $ git clone https://github.com/foxmask/joplin-web
Cloning into 'joplin-web'...
...
$ cd joplin-web
$ pip install -r requirements.txt
Collecting requests==2.20.0 (from -r requirements.txt (line 1))
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/f1/ca/10332a30cb25b627192b4ea272c351bce3ca1091e541245cccbace6051d8/requests-2.20.0-py2.py3-none-any.whl (60kB)
100% |ββββββββββββββββββββββββββββββββ| 61kB 2.1MB/s
Collecting django-filter==2.0.0 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/6a/8b/8517167a0adc45ce94d0873efb9487dd4cdeff7e10f96e837ad3d58f5837/django_filter-2.0.0-py3-none-any.whl (69kB)
100% |ββββββββββββββββββββββββββββββββ| 71kB 2.7MB/s
Collecting djangorestframework==3.9.0 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/99/0b/d37a5a96c5d301e23adcabcc2f3fa659fb34e6308590f95ebb50cdbe98a1/djangorestframework-3.9.0-py2.py3-none-any.whl (924kB)
100% |ββββββββββββββββββββββββββββββββ| 931kB 731kB/s
Collecting Markdown==3.0.1 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/7a/6b/5600647404ba15545ec37d2f7f58844d690baf2f81f3a60b862e48f29287/Markdown-3.0.1-py2.py3-none-any.whl (89kB)
100% |ββββββββββββββββββββββββββββββββ| 92kB 2.8MB/s
Collecting django-environ==0.4.5 (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/9f/32/76295a1a5d00bf556c495216581c6997e7fa5f533b2229e0a9d6cbaa95ae/django_environ-0.4.5-py2.py3-none-any.whl
Collecting django-cors-headers==2.4.0 (from -r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/cc/7e/83ba784ad2b95317bbbed915f0888d7d1cd8dc3d2e4b8ddec8fbc4c3e800/django_cors_headers-2.4.0-py2.py3-none-any.whl
Collecting joplin-api==1.2.1 (from -r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/dd/d6/d331275da1307269ae79fd0c9f6aaa2d338d75fd217decb046a8a5174f58/joplin-api-1.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-in1oh49j/joplin-api/setup.py", line 6, in <module>
from joplin_api import __version__ as version
File "/tmp/pip-build-in1oh49j/joplin-api/joplin_api/__init__.py", line 7, in <module>
from .core import JoplinApi
File "/tmp/pip-build-in1oh49j/joplin-api/joplin_api/core.py", line 21, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-in1oh49j/joplin-api/
Sorry for not being a python wizβ¦
itβs really weird
so, after you did
git clone https://github.com/foxmask/joplin-web
edit requirements.txt and add a # before joplin-api line to add the line in comment
then redo
pip install -r requirements.txt
the joplin-api wont be installed
then continue by:
cd ..
git clone https://github.com/foxmask/joplin-api
cd joplin-api
pip install -r requirements.txt
thus the joplin api will be installed βby handβ (instead of with the dependencies that should have been made before)
then you can continue to read the install https://github.com/foxmask/joplin-web/blob/master/README.md
from the βSettingsβ part
Thanks guys, I will take a look at this, sounds promising
Okay, got so far.
Then:
$ cd ../joplin-web (I assume)
$ cp joplin_web/env.sample joplin_web/.env
$ edit joplin_web/.env (according to docs)
$ python manage.py migrate
ModuleNotFoundError: No module named 'debug_toolbar'
So I added
$ pip install django-debug-toolbar
$ python manage.py migrate
ModuleNotFoundError: No module named 'joplin_api'
Actually, this is not surprising, since the joplin-api is, indeed, not yet installed.
$ cd ../joplin-api
$ python setup.py install
$ cd ../joplin-web
$ python manage.py migrate
$ python manage.py runserver localhost:9876
Performing system checks...
System check identified no issues (0 silenced).
December 14, 2018 - 18:40:28
Django version 2.1.4, using settings 'joplin_web.settings'
Starting development server at http://localhost:9876/
Quit the server with CONTROL-C.
When I point my browser to this address, I get an error page TemplateDoesNotExist at /
index.html
The server reports:
django.template.exceptions.TemplateDoesNotExist: index.html
Oops I did forget to push it
a git pull should do the trick
Progress...
django.template.exceptions.TemplateSyntaxError: 'webpack_loader' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
admin_urls
cache
i18n
l10n
log
rest_framework
static
staticfiles
tz
I saw just right now .... It sux
I knew I should not push unfinished code
git pull should be better now.
once the django app is started, do not go to http://localhost:9876/ there is nothing there
the django app provides endpoints API at http://localhost:9876/api/jw/
as in the README I wrote to use port 8001 because the front expects to find the back, at that port, but you started the django app on another port, you will need to change that port in the file joplin-front/vue.config.js
too.
replace
target: 'http://127.0.0.1:8001'
by
target: 'http://127.0.0.1:9876'
then you could launch
npm run serve
and have
DONE Compiled successfully in 6966ms 20:58:49
App running at:
- Local: http://localhost:8080/
- Network: http://localhost:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
the front is ready on http://localhost:8080/ and get data from http://localhost:9876/api/jw/
For convenience, I changed the port back to 8001.
Running npm run serve
in the joplin-front
directory gives
> joplin-front@0.1.0 serve /home/jv/tmp/joplin-web/joplin-web/joplin-web/joplin-front
> vue-cli-service serve --mode development --host localhost --port 8080
sh: vue-cli-service: command not found
did you begin by
cd joplin-front
npm run install
then
rpm run serve
?
ERROR Failed to compile with 1 errors 21:13:15
Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Cannot find module 'eslint'
After manual install of eslint:
error in ./node_modules/bootstrap-vue/es/components/dropdown/dropdown.css
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer'
that starts to become hard to know why this module fails to install I hope they dont break it
I assume you have installed a lot of modules on your system, and that the list of dependencies in the Joplin Web tools is not accurate.
FYI: This is what I have on my screen now
yeah I proud of you
funny to see his work somewhere else ! good job
I guess I am the 2nd person in the world to run this?
Iβm now beginning to get a basic idea of how this all works, and how the components fit together.
I wanted to complete this exercise because Iβm curious by nature, and to help you improving the code/dependencies/instructions and so on. I deleted everything a couple of times and started from scratch to make sure all neccessary steps are accurate. For me, that is.
I will be glad to take every feedback
Known bug : the images are not displayed (yet) I had to think about it