Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6eff85c

Browse files
Merge pull request #1 from zestgeek/server_implementation
implemented backend code
2 parents eb80b07 + cef1d0a commit 6eff85c

19 files changed

+12403
-18
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
node_modules/
3+
api/node_modules
34
/dist/
45
npm-debug.log*
56
yarn-debug.log*

‎api/app/models/login.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
var mongoose = require('mongoose');
2+
var Schema = mongoose.Schema;
3+
var validateEmail = function(email) {
4+
var re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
5+
return re.test(email);
6+
};
7+
8+
9+
var LoginSchema = new Schema({
10+
username: {
11+
type : String,
12+
required: 'Please provide the username'
13+
},
14+
password: {
15+
type: String,
16+
required: 'Please provide the password'
17+
},
18+
confirm_password : {
19+
type : String,
20+
required : "Please provide the confirm password." ,
21+
validate: [passwordConfirm, 'Password and confirm password ......']
22+
},
23+
email: {
24+
type: String,
25+
trim: true,
26+
lowercase: true,
27+
unique: true,
28+
required: 'Email address is required',
29+
validate: [validateEmail, 'Please fill a valid email address'],
30+
match: [/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/, 'Please fill a valid email address']
31+
}
32+
});
33+
34+
// function that validate the password and confirm password
35+
function passwordConfirm(value) {
36+
// `this` is the mongoose document
37+
return this.password == value;
38+
}
39+
40+
module.exports = mongoose.model('Login', LoginSchema);

‎api/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
secret: 'SomeSecretString',
3+
};

‎api/dist/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><html><head><meta charset=utf-8><link src=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css><link type=text/css rel=stylesheet href=//unpkg.com/bootstrap@next/dist/css/bootstrap.min.css><link type=text/css rel=stylesheet href=//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css><script src=https://code.jquery.com/jquery-3.2.1.js integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin=anonymous></script><script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js></script><meta name=viewport content="width=device-width,initial-scale=1"><title>projectvue</title><link href=/static/css/app.3645b232c3f0d2290d9b545fe1dfbd87.css rel=stylesheet></head><body style=background-color:#007bff><div id=app></div><script src=//unpkg.com/babel-polyfill@latest/dist/polyfill.min.js></script><script src=//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js></script><script type=text/javascript src=/static/js/manifest.14a7bd0d2065353721a9.js></script><script type=text/javascript src=/static/js/vendor.d6fc5614b870bd75d40b.js></script><script type=text/javascript src=/static/js/app.a9af91fe03779167d096.js></script></body></html>

‎api/dist/static/css/app.3645b232c3f0d2290d9b545fe1dfbd87.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/dist/static/css/app.3645b232c3f0d2290d9b545fe1dfbd87.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/dist/static/js/app.a9af91fe03779167d096.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/dist/static/js/app.a9af91fe03779167d096.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/dist/static/js/manifest.14a7bd0d2065353721a9.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/dist/static/js/manifest.14a7bd0d2065353721a9.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /