# Deploy as web app?

**URL:** <https://discourse.joplinapp.org/t/deploy-as-web-app/1180>\
**Category:** Support\
**Created:** [14 December 2018 00:23 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180 "2018-12-14T00:23:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartoo](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kartoo/32/324_2.png) [@kartoo](https://discourse.joplinapp.org/u/kartoo)\
**Post date:** [14 December 2018 00:23 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/1 "2018-12-14T00:23:00Z")

</div>

Hi

Is it possible to deploy this as a web app? If so I am planning to use it inside my intranet.

thanks

---

<div class="post-metadata">

**Author:** ![CalebJohn](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/calebjohn/32/356_2.png) [@CalebJohn](https://discourse.joplinapp.org/u/CalebJohn)\
**Post date:** [14 December 2018 02:46 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/2 "2018-12-14T02:46:48Z")

</div>

@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.

> **[foxmask/joplin-web](https://github.com/foxmask/joplin-web)**
>
> :snake: :books: Web application companion for Joplin - foxmask/joplin-web

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 07:55 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/3 "2018-12-14T07:55:53Z")

</div>

It's nice for trying it 😉

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 08:44 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/4 "2018-12-14T08:44:33Z")

</div>

Okay, I tried to give it a try :).

```auto
$ 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…

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 14:48 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/5 "2018-12-14T14:48:49Z")

</div>

it’s really weird

so, after you did

```auto
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

```auto
pip install -r requirements.txt

```

the joplin-api wont be installed

then continue by:

```auto
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](https://github.com/foxmask/joplin-web/blob/master/README.md)  
from the “Settings” part

---

<div class="post-metadata">

**Author:** ![kartoo](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kartoo/32/324_2.png) [@kartoo](https://discourse.joplinapp.org/u/kartoo)\
**Post date:** [14 December 2018 17:26 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/6 "2018-12-14T17:26:17Z")

</div>

Thanks guys, I will take a look at this, sounds promising

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 18:48 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/7 "2018-12-14T18:48:05Z")

</div>

Okay, got so far.

Then:

```auto
$ 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

```auto
$ 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.

```auto
$ 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:

```auto
django.template.exceptions.TemplateDoesNotExist: index.html

```

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 19:12 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/8 "2018-12-14T19:12:36Z")

</div>

Oops I did forget to push it 😉

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 19:20 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/9 "2018-12-14T19:20:15Z")

</div>

a git pull should do the trick

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 19:32 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/10 "2018-12-14T19:32:52Z")

</div>

Progress... 🙂

```auto
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

```

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 19:34 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/11 "2018-12-14T19:34:44Z")

</div>

I saw just right now .... It sux  
I knew I should not push unfinished code 🙂

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 20:00 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/12 "2018-12-14T20:00:08Z")

</div>

git pull should be better now.

once the django app is started, do not go to [http://localhost:9876/](http://localhost:9876/) there is nothing there 😉  
the django app provides endpoints API at [http://localhost:9876/api/jw/](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

```auto
target: 'http://127.0.0.1:8001'

```

by

```auto
target: 'http://127.0.0.1:9876'

```

then you could launch

```auto
npm run serve 

```

and have

```auto
 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/](http://localhost:8080/) and get data from [http://localhost:9876/api/jw/](http://localhost:9876/api/jw/)

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 20:07 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/13 "2018-12-14T20:07:20Z")

</div>

For convenience, I changed the port back to 8001.

Running `npm run serve` in the `joplin-front` directory gives

```auto
> 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

```

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 20:10 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/14 "2018-12-14T20:10:28Z")

</div>

did you begin by

```auto
cd joplin-front
npm run install 

```

then

```auto
rpm run serve

```

?

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 20:14 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/15 "2018-12-14T20:14:03Z")

</div>

```auto
 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:

```auto
 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'

```

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 20:18 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/16 "2018-12-14T20:18:31Z")

</div>

that starts to become hard to know why this module fails to install 😕 I hope they dont break it 😕

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 20:23 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/17 "2018-12-14T20:23:35Z")

</div>

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 😁

 ![scrot20181214212212](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/1X/994499ad37e628a61d5a227f4b00033771eec057.png)

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 20:24 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/18 "2018-12-14T20:24:48Z")

</div>

yeah 🙂 I proud of you 😃 funny to see his work somewhere else ! good job

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [14 December 2018 20:30 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/19 "2018-12-14T20:30:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [14 December 2018 20:32 UTC](https://discourse.joplinapp.org/t/deploy-as-web-app/1180/20 "2018-12-14T20:32:20Z")

</div>

I will be glad to take every feedback  
Known bug : the images are not displayed (yet) I had to think about it 🙂

[Next page](https://discourse.joplinapp.org/t/deploy-as-web-app/1180.md?page=2)
