-
Notifications
You must be signed in to change notification settings - Fork 2
Features #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Sagar2177
wants to merge
23
commits into
hyperlearn:master
Choose a base branch
from
Sagar2177:features
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Features #3
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fbfbe3c
Added sort, pagination and search functionality to our products api
4608545
Merge pull request #1 from hyperlearn/products_api_enhancement
iamads 8777532
Added User Model
b96f994
Added migration + signup route
a5c59a4
pull request test
Sagar2177 b786c37
twilio tested - working
Sagar2177 922c488
config.yml added
Sagar2177 04670b8
config.yml added
Sagar2177 958395e
config.yml added
Sagar2177 505a2ce
config.yml added
Sagar2177 b9d98f4
config.yml added
Sagar2177 4c7c591
config.yml added
Sagar2177 a8bbd5a
files are moving to digital ocean but getting some dependencies errors
Sagar2177 e32225e
git pull request added insted of clone
Sagar2177 11ebcba
git pull request added insted of clone
Sagar2177 71125ba
git pull request added insted of clone
Sagar2177 39dc726
git pull request added insted of clone
Sagar2177 f72c539
git pull request added insted of clone
Sagar2177 091f87f
update in config.yml
Sagar2177 438eb62
update in config.yml v3
Sagar2177 34f793f
checking prisma errors
Sagar2177 1bc851d
checking prisma errors
Sagar2177 eeb59d6
prisma errors resolved
Sagar2177 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| version: 2 # use CircleCI 2.0 | ||
| jobs: | ||
| build: | ||
| working_directory: ~/new-ecommerce # directory where steps will run | ||
| docker: # run the steps with Docker | ||
| - image: circleci/node:14.0 # ...with this image as the primary container; this is where all `steps` will run | ||
| steps: # a collection of executable commands | ||
| - checkout # special step to check out source code to working directory | ||
| - run: | ||
| name: update-npm | ||
| command: 'sudo npm install -g npm@latest' | ||
| - restore_cache: # special step to restore the dependency cache | ||
| # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ | ||
| key: dependency-cache-{{ checksum "package.json" }} | ||
| - run: | ||
| name: install-dependencies | ||
| command: npm install | ||
| - save_cache: # special step to save the dependency cache | ||
| key: dependency-cache-{{ checksum "package.json" }} | ||
| paths: | ||
| - ./node_modules | ||
| - add_ssh_keys: | ||
| fingerprints: | ||
| - "2c:18:35:24:5d:a5:96:8f:e9:c8:b4:5c:8f:cc:21:94" | ||
| - deploy: | ||
| name: deployment | ||
| command: ssh -o "StrictHostKeyChecking no" root@68.183.90.186 " cd new-ecommerce && git pull https://github.com/Sagar2177/devsnest-ecommerce-app.git features && sh deployment.sh " | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| node_modules | ||
| # Keep environment variables out of version control | ||
| .env | ||
| .DS_Store |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| const { createUser } = require('../services/user.service'); | ||
|
|
||
| const login = () => { | ||
|
|
||
| } | ||
|
|
||
| const signUp = async (req, res) => { | ||
| const { | ||
| name, email, password, confirmPassword, phoneNumber, | ||
| dob | ||
| } = req.body; | ||
|
|
||
| // name, email, password, confirmPassword | ||
| // and phone number are present | ||
| if (!(name && email && password && confirmPassword | ||
| && phoneNumber)) { | ||
| res.status(400).json({ msg: "Insufficient Information"}) | ||
| } | ||
| // password and confirm password are same | ||
| if (password!==confirmPassword) { | ||
| res.status(400).json({ msg: "Passwords don't match"}); | ||
| } | ||
|
|
||
| try { | ||
| await createUser({name, email, password, | ||
| phoneNumber, dob}); | ||
| res.status(201).json({ msg: "Successfully Signed Up"}); | ||
| } catch (err) { | ||
| console.log(err.stack); | ||
| res.status(500).json({ msg: "Something Failed!"}); | ||
| } | ||
| }; | ||
|
|
||
| module.exports = { | ||
| login, | ||
| signUp | ||
| }; |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
| echo ‘installing requirements…’ | ||
| apt-get install -y npm | ||
| npm install | ||
| echo ‘start server…’ | ||
|
|
||
| pm2 restart index | ||
|
|
||
| echo ‘started server. ending SSH session..’ | ||
| exit |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ecommerce