This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bucket: | |
strip: 1 | |
packages: | |
- name: form | |
actions: | |
- name: insert | |
limits: | |
timeout: 60000 | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require("mongoose"); | |
const DB_Username = process.env.DB_Username; //getting credentials from Environment variables | |
const DB_Password = process.env.DB_Password; | |
const DB_Name = process.env.DB_Name; | |
const DB_ClusterUri = process.env.DB_ClusterUri; | |
const DATABASEURI = `mongodb+srv://${DB_Username}:${DB_Password}@${DB_ClusterUri}/${DB_Name}?retryWrites=true&w=majority`; | |
mongoose | |
.connect(DATABASEURI, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install | |
rm -fr build | |
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
nameis: | |
container_name: devportfolio | |
build: | |
context: . | |
dockerfile: Dockerfile | |
image: react:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
nameis: | |
container_name: expressapi | |
build: | |
context: . | |
dockerfile: Dockerfile | |
image: express:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pull official base image | |
FROM node:13.12.0-alpine | |
# set working directory | |
WORKDIR /app | |
# add `/app/node_modules/.bin` to $PATH | |
ENV PATH /app/node_modules/.bin:$PATH | |
# install app dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pull official base image | |
FROM node:13.12.0-alpine | |
# set working directory | |
WORKDIR /app | |
# add `/app/node_modules/.bin` to $PATH | |
ENV PATH /app/node_modules/.bin:$PATH | |
# install app dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require("mongoose"); | |
const express = require("express") | |
const bodyParser = require('body-parser'); | |
const DB_Username = process.env.DB_Username; //getting credentials from Environment variables | |
const DB_Password =process.env.DB_Password;; | |
const DB_Name = process.env.DB_Name; | |
const DB_ClusterUri = process.env.DB_ClusterUri; | |
const DATABASEURI = `mongodb+srv://${DB_Username}:${DB_Password}@${DB_ClusterUri}/${DB_Name}?retryWrites=true&w=majority`; | |
const port = process.env.PORT; | |
const router = express.Router() |