Skip to content

Commit

Permalink
Dev backend (#8)
Browse files Browse the repository at this point in the history
* Feature/mongoose (#1)

* ➕ Add mongoose dependency

* ➕ Add @nestjs/config dependency

* 🔧 Add .env files to .gitignore

* ✨ Add database module

* ✨ Add config module

* 🔧 Add types to config module

* ➕ Add joi dependency

* 🔧 Add type validation to enviroment variables

* ✨ database.module running!

* Feature/save mail (#2)

* 🔧 Add global prefix "api" to project

* ➕ Add @nestjs/mapped-types dependency

* ✨ Add mail module

* ➕ Add class-validator dependency

* ✨ Add mail entity

* ✨ Add Mail schema to mail module

* ✨ Add validation to mail dto

* ✨ Add mongo to mail service

* 🔧 Add validation based on dtos

* Feature/encript (#3)

* ➕ Add crypto-js dependency

* ✨ Add crypto functions

* 🔧 Add secret_key to config.ts

* 🔧 validate secret key on .env

* ✨ encrypt mail and body

* Feature/verification email (#4)

* ➕ add nodemailer dependency

* 🔧 Add enviroment variables for email

* ➕ Add nestjs-modules/mailer dependency

* 🔧 Add email variables to config.ts

* ✨ Import MailerModule on mails module

* ✨ Add hashUrl function

* 🔧 Add client_url env varieble to config.ts

* 🔧 Add client_url variable to validation schema

* ✨ Send verification email

* Feature/verify email (#5)

* ✏️ Fix typo in mail.entity.ts

* ✨ Add service and controller to verificate email

* Feature/cron (#6)

* ➕ Add luxon dependency

* ➖ Remove crypto-js and add cryptr to dependency

* 🔧 Add "esModuleInterop: true" to tsconfig.json

* 💥 Change logic of encrypt and decrypt

* ➕ Add @nestjs/schedule dependency

* 🔧 Add ScheduleModule to mail.module

* ✨ Implement cronTask to send today's email

* Feature/docker (#7)

* 🔧 Add mongo_data to .env file

* 🔧 Add database .env variables to config.ts

* 🗃️ Add enviroment variables to connect to mongo

* 🐋Add docker file and docker compose!

* 🔧Change docker file
  • Loading branch information
Monge1h authored Mar 21, 2022
1 parent 3fd1174 commit b6f2267
Show file tree
Hide file tree
Showing 19 changed files with 3,948 additions and 191 deletions.
6 changes: 5 additions & 1 deletion backend/sendthistomyfuture-me/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ lerna-debug.log*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/extensions.json

# Enviroments
*.env
/mongo_data
12 changes: 12 additions & 0 deletions backend/sendthistomyfuture-me/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:current-alpine

ENV NODE_VERSION 16.13.2

WORKDIR /app
ADD package.json package-lock.json ./
ADD . .

RUN npm install --silent
RUN npm run build

ENTRYPOINT [ "npm", "run", "start:prod" ]
14 changes: 14 additions & 0 deletions backend/sendthistomyfuture-me/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#docker-compose.yml
version: '3.8'

services:

server:

build: .
env_file:
- .env
ports:
- ${PORT}:${PORT}

restart: unless-stopped
Loading

1 comment on commit b6f2267

@vercel
Copy link

@vercel vercel bot commented on b6f2267 Mar 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.