From e9e2d7cb812062b24347e3964da48ac74debcc49 Mon Sep 17 00:00:00 2001 From: androiddrew Date: Thu, 21 Jun 2018 16:22:18 -0400 Subject: [PATCH] added optional startup script. Created dismissable alert --- client/src/components/Alert.vue | 32 ++++++++++++++++++++++++++++++++ client/src/components/Books.vue | 14 +++++++++++--- scripts/startup.py | 15 +++++++++++++++ 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 client/src/components/Alert.vue create mode 100644 scripts/startup.py diff --git a/client/src/components/Alert.vue b/client/src/components/Alert.vue new file mode 100644 index 0000000..e1c660b --- /dev/null +++ b/client/src/components/Alert.vue @@ -0,0 +1,32 @@ + + + diff --git a/client/src/components/Books.vue b/client/src/components/Books.vue index aef9e2e..f17df50 100644 --- a/client/src/components/Books.vue +++ b/client/src/components/Books.vue @@ -5,6 +5,7 @@

Books




+

@@ -79,17 +80,23 @@ \ No newline at end of file + diff --git a/scripts/startup.py b/scripts/startup.py new file mode 100644 index 0000000..f6924c2 --- /dev/null +++ b/scripts/startup.py @@ -0,0 +1,15 @@ +import os +import subprocess +import sys + +# subprocess.run('npm --version', shell=True) +# +# subprocess.check_call('node --version', shell=True) +os.chdir('./client') + +if sys.platform == 'win32': + npm_proc = subprocess.Popen('start cmd.exe /k "npm run serve"', shell=True) + wsgi_proc = subprocess.Popen('start cmd.exe /k "serve.exe "', shell=True) + sys.exit(0) +else: + sys.exit(1)