Tx321 commited on
Commit
da5f548
·
1 Parent(s): 1854124

Add Flowise application files

Browse files
Files changed (3) hide show
  1. Dockerfile +14 -0
  2. index.js +13 -0
  3. package.json +13 -0
Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:14
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user package*.json ./
10
+ RUN npm install
11
+
12
+ COPY --chown=user . .
13
+
14
+ CMD ["npm", "start"]
index.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const express = require('express');
2
+ const flowise = require('flowise'); // Ajuste conforme necessário para a importação do Flowise
3
+
4
+ const app = express();
5
+ const port = 7860;
6
+
7
+ app.get('/', (req, res) => {
8
+ res.send('Flowise is running!');
9
+ });
10
+
11
+ app.listen(port, () => {
12
+ console.log(`App is listening at http://localhost:${port}`);
13
+ });
package.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "flowise",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "start": "node index.js"
7
+ },
8
+ "dependencies": {
9
+ "express": "^4.17.1",
10
+ "flowise": "^1.0.0"
11
+ }
12
+ }
13
+