mirror of
https://github.com/sakaljurgis/kobo.git
synced 2026-07-08 22:17:42 +00:00
dont watch for prod env
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
PORT=3000
|
PORT=3000
|
||||||
|
NODE_ENV=development
|
||||||
|
|||||||
+1
-8
@@ -1,15 +1,8 @@
|
|||||||
FROM node:18
|
FROM node:18
|
||||||
|
|
||||||
#install calibre
|
|
||||||
RUN apt-get update -y
|
|
||||||
RUN apt-get install -y libopengl0
|
|
||||||
RUN apt-get install -y libegl1
|
|
||||||
RUN wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
|
|
||||||
|
|
||||||
WORKDIR /srv/app
|
WORKDIR /srv/app
|
||||||
COPY ./ /srv/app
|
COPY ./ /srv/app
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
CMD ["npm", "run", "dev"]
|
CMD ["npm", "run", "start"]
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "kobo",
|
"name": "app",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|||||||
+3
-1
@@ -15,7 +15,9 @@
|
|||||||
"prepare": "npm run compile",
|
"prepare": "npm run compile",
|
||||||
"pretest": "npm run compile",
|
"pretest": "npm run compile",
|
||||||
"posttest": "npm run lint",
|
"posttest": "npm run lint",
|
||||||
"dev": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts"
|
"dev": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts",
|
||||||
|
"prod": "ts-node src/index.ts",
|
||||||
|
"start": "bash ./start.sh"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@extractus/article-extractor": "^7.3.1",
|
"@extractus/article-extractor": "^7.3.1",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ interface Article {
|
|||||||
title: string;
|
title: string;
|
||||||
dateAdded: string;
|
dateAdded: string;
|
||||||
uid: string;
|
uid: string;
|
||||||
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ArticlesRepository {
|
class ArticlesRepository {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ addArticleRouter.get('/', (req, res) => {
|
|||||||
uid: hash,
|
uid: hash,
|
||||||
title: article.title ?? 'no title',
|
title: article.title ?? 'no title',
|
||||||
dateAdded: new Date().toISOString().split('T')[0],
|
dateAdded: new Date().toISOString().split('T')[0],
|
||||||
|
url,
|
||||||
});
|
});
|
||||||
|
|
||||||
mkdir(dir, {recursive: true}, (err) => {
|
mkdir(dir, {recursive: true}, (err) => {
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# install calibre
|
||||||
|
echo "Installing calibre"
|
||||||
|
apt-get update -y
|
||||||
|
apt-get install -y libopengl0
|
||||||
|
apt-get install -y libegl1
|
||||||
|
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
|
||||||
|
|
||||||
|
# npm install
|
||||||
|
echo "Installing dependencies"
|
||||||
|
npm install
|
||||||
|
|
||||||
|
if [ "$NODE_ENV" == "production" ]; then
|
||||||
|
echo "Running prod"
|
||||||
|
npm run prod
|
||||||
|
else
|
||||||
|
echo "Running dev"
|
||||||
|
npm run dev
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user