Skip to content

Commit

Permalink
Merge pull request #14 from SiGMobileUIUC/kitkat
Browse files Browse the repository at this point in the history
Merge to master
  • Loading branch information
rahulshamkuwar authored Aug 14, 2021
2 parents d4ab9f2 + 4e20097 commit 703d9f0
Show file tree
Hide file tree
Showing 58 changed files with 16,084 additions and 955 deletions.
5 changes: 5 additions & 0 deletions .env.docker.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ PORT=80
POSTGRES_DB=oneplaceillinoisdb
POSTGRES_USER=oneplaceillinois
POSTGRES_PASSWORD=twoplaceillinois

# DON'T CHANGE BELOW HERE

# use pm2 as non-root on docker
PM2_HOME=/usr/src/oneplace-illinois-api
23 changes: 3 additions & 20 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,7 @@ PORT=80
POSTGRES_HOST=localhost
POSTGRES_DB=oneplaceillinois
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgresLoginPassword
POSTGRES_PASSWORD=twoplaceillinois

# JWT
# JWT secret key
JWT_SECRET=thisisasamplesecret
# Number of minutes after which an access token expires
JWT_ACCESS_EXPIRATION_MINUTES=30
# Number of days after which a refresh token expires
JWT_REFRESH_EXPIRATION_DAYS=30
# Number of minutes after which a reset password token expires
JWT_RESET_PASSWORD_EXPIRATION_MINUTES=10
# Number of minutes after which a verify email token expires
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES=10

# SMTP configuration options for the email service
# For testing, you can use a fake SMTP service like Ethereal: https://ethereal.email/create
SMTP_HOST=email-server
SMTP_PORT=587
SMTP_USERNAME=email-server-username
SMTP_PASSWORD=email-server-password
EMAIL_FROM=[email protected]
# Express Middlewares
COOKIE_SECRET=GENERATE_SHA512_AND_PASTE_HERE
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"ecmaVersion": 2018
},
"rules": {
"no-console": "error",
"no-console": "off",
"func-names": "off",
"no-underscore-dangle": "off",
"consistent-return": "off",
"jest/expect-expect": "off",
"security/detect-object-injection": "off"
"security/detect-object-injection": "off",
"max-len": [1, 120, 4]
}
}
12 changes: 0 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@ FROM node:alpine

RUN apk update

#
# Setup Postgres
#
#RUN /etc/init.d/postgresql start && \
# psql --command "CREATE USER oneplaceillinois WITH SUPERUSER PASSWORD 'opillines123';" && \
# createdb -O docker docker

#
# Do Node and NPM stuff
#

RUN mkdir -p /usr/src/oneplace-illinois-api

WORKDIR /usr/src/oneplace-illinois-api
Expand All @@ -23,7 +12,6 @@ COPY ["package.json", "package-lock.json*", "./"]
ENV NODE_ENV="production"

# npm ci is faster than npm install BUT requires package-lock.json
# node_env production makes npm ci install only dependencies (but put flag just to make sure)
RUN npm ci --only=production

# After install node_modules, copy everything
Expand Down
Loading

0 comments on commit 703d9f0

Please sign in to comment.