Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .rancher-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
stages:
- name: Build and Publish Image
steps:
- publishImageConfig:
dockerfilePath: ./Dockerfile
buildContext: .
tag: copyt/copyt-platform-sneaks-api:${CICD_GIT_BRANCH}
registry: 127.0.0.1:34571
timeout: 60
branch:
include:
- master
notification: {}
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:14-alpine
LABEL maintainer="Colin Griffin <[email protected]>"

ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$PATH:/home/node/.npm-global/bin

COPY package.json package-lock.json /temp/
RUN cd temp && npm ci && npm install -g nodemon

COPY . /src

RUN mv /temp/node_modules /src/node_modules

WORKDIR /src

EXPOSE 3002

CMD ["npm", "start"]
4 changes: 3 additions & 1 deletion controllers/sneaks.controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ var getProducts = function (keyword, callback) {
var productCounter = 0;
stockXScraper.getProductsAndInfo(keyword, function (error, products) {
if (error) {
callback(error, null)
// this should return status code 404
// todo: status code to 404
return callback(error, null)
}
products.forEach(function (shoe) {
var cbCounter = 0;
Expand Down
Loading