Skip to content

Commit

Permalink
Merge branch '59-full-app-integration' of github.com:pokt-scan/pocket…
Browse files Browse the repository at this point in the history
…-ml-testbench into 59-full-app-integration
  • Loading branch information
RawthiL committed Jun 20, 2024
2 parents 6b37386 + 99d621f commit e8ef9a1
Show file tree
Hide file tree
Showing 40 changed files with 7,918 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ morse-localnet-poc
reports
LICENSE
README.md
.venv
.venv
*/**/node_modules
*/**/.next
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ __pycache__
.fuse_hidden*

# config.json - this should be only used locally and not added to VCS
**/config.json
**/config.json
37 changes: 37 additions & 0 deletions apps/nodejs/test-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
/dist

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
30 changes: 30 additions & 0 deletions apps/nodejs/test-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Use an official Node.js runtime as the base image
FROM node:18.20-alpine

# Create application directory
WORKDIR /usr/src/app

# Install pnpm
RUN npm install -g pnpm

# Define environment variable
ENV NODE_ENV production

# Install application dependencies
# A wildcard is used to ensure package.json and pnpm-lock.yaml are copied where available
COPY apps/nodejs/test-api/package*.json pnpm-lock.yaml* ./

# Install only production dependencies
RUN pnpm install

# Copy application source code to the container
COPY apps/nodejs/test-api .

# Build the app
RUN pnpm run build

# Run the app when the container launches
CMD [ "pnpm", "start" ]

# Expose the listening port
EXPOSE 3001
21 changes: 21 additions & 0 deletions apps/nodejs/test-api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "test-api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node dist/server.js",
"build": "pnpm exec tsc"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/node": "^20.14.6",
"typescript": "^5.4.5",
"cors": "^2.8.5",
"express": "^4.19.2"
}
}
Loading

0 comments on commit e8ef9a1

Please sign in to comment.