Spaces:
Sleeping
Sleeping
Commit ·
71ed0f8
1
Parent(s): df7d15c
Uploaded
Browse files- Dockerfile +5 -9
- package.json +13 -10
- server.js +0 -1
Dockerfile
CHANGED
|
@@ -1,20 +1,16 @@
|
|
| 1 |
-
# Use an official lightweight Node.js image
|
| 2 |
FROM node:18-alpine
|
| 3 |
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy package.json and package-lock.json to leverage Docker cache
|
| 8 |
COPY package*.json ./
|
| 9 |
|
| 10 |
-
# Install production dependencies
|
| 11 |
RUN npm install --production
|
| 12 |
|
| 13 |
-
# Copy the rest of your application code
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
# The command to run your application
|
| 20 |
-
CMD ["node", "server.js"]
|
|
|
|
|
|
|
| 1 |
FROM node:18-alpine
|
| 2 |
|
| 3 |
# Set the working directory inside the container
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Copy package.json and package-lock.json first to leverage Docker's build cache
|
| 7 |
COPY package*.json ./
|
| 8 |
|
| 9 |
+
# Install only production dependencies to keep the image small
|
| 10 |
RUN npm install --production
|
| 11 |
|
| 12 |
+
# Copy the rest of your application code (server.js, index.html, etc.)
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
+
# The command to run your application using the standard npm script
|
| 16 |
+
CMD ["npm", "start"]
|
|
|
|
|
|
|
|
|
package.json
CHANGED
|
@@ -1,19 +1,22 @@
|
|
| 1 |
{
|
| 2 |
-
"name": "
|
| 3 |
"version": "1.0.0",
|
| 4 |
-
"
|
|
|
|
| 5 |
"scripts": {
|
| 6 |
-
"
|
|
|
|
| 7 |
},
|
| 8 |
-
"keywords": [],
|
| 9 |
"author": "",
|
| 10 |
"license": "ISC",
|
| 11 |
-
"description": "",
|
| 12 |
"dependencies": {
|
| 13 |
-
"@google/generative-ai": "^0.
|
| 14 |
"cors": "^2.8.5",
|
| 15 |
-
"dotenv": "^
|
| 16 |
-
"express": "^
|
| 17 |
-
"googleapis": "^
|
|
|
|
|
|
|
|
|
|
| 18 |
}
|
| 19 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"name": "hillside-dashboard-backend",
|
| 3 |
"version": "1.0.0",
|
| 4 |
+
"description": "API for the Hillside Dashboard",
|
| 5 |
+
"main": "server.js",
|
| 6 |
"scripts": {
|
| 7 |
+
"start": "node server.js",
|
| 8 |
+
"dev": "nodemon server.js"
|
| 9 |
},
|
|
|
|
| 10 |
"author": "",
|
| 11 |
"license": "ISC",
|
|
|
|
| 12 |
"dependencies": {
|
| 13 |
+
"@google/generative-ai": "^0.1.3",
|
| 14 |
"cors": "^2.8.5",
|
| 15 |
+
"dotenv": "^16.4.5",
|
| 16 |
+
"express": "^4.19.2",
|
| 17 |
+
"googleapis": "^133.0.0"
|
| 18 |
+
},
|
| 19 |
+
"devDependencies": {
|
| 20 |
+
"nodemon": "^3.1.0"
|
| 21 |
}
|
| 22 |
+
}
|
server.js
CHANGED
|
@@ -160,7 +160,6 @@ app.get('/api/ask-luis', async (req, res) => {
|
|
| 160 |
3. **Highlighting:** To make important data like names, locations, or extensions stand out in your text or tables, enclose them in single backticks. For example: "The main office for \`LiveOak\` is the \`Main Branch\`."
|
| 161 |
4. **Aggregations (Counts):** If asked for a count ("how many MAs?", "VA count"), calculate the total from the data and give a precise number.
|
| 162 |
5. **Handling Ambiguity:** If a question is ambiguous (e.g., "give me the list of MAs" without a location), you MUST ask a clarifying question (e.g., "Of which location would you like the list of MAs? You can also ask for all of them.").
|
| 163 |
-
|
| 164 |
**Directory Data:**
|
| 165 |
${JSON.stringify(processedStaffCache)}
|
| 166 |
**User's Question:**
|
|
|
|
| 160 |
3. **Highlighting:** To make important data like names, locations, or extensions stand out in your text or tables, enclose them in single backticks. For example: "The main office for \`LiveOak\` is the \`Main Branch\`."
|
| 161 |
4. **Aggregations (Counts):** If asked for a count ("how many MAs?", "VA count"), calculate the total from the data and give a precise number.
|
| 162 |
5. **Handling Ambiguity:** If a question is ambiguous (e.g., "give me the list of MAs" without a location), you MUST ask a clarifying question (e.g., "Of which location would you like the list of MAs? You can also ask for all of them.").
|
|
|
|
| 163 |
**Directory Data:**
|
| 164 |
${JSON.stringify(processedStaffCache)}
|
| 165 |
**User's Question:**
|