-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from JustalK/pre-dev
[REFACTORING] Improving the portfolio page
- Loading branch information
Showing
46 changed files
with
1,760 additions
and
1,201 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
const mongoose = require('mongoose'); | ||
|
||
module.exports = [ | ||
{ | ||
name: "portfolio", | ||
title: "Work", | ||
description: "From Web Components and UI/UX animations to React.JS, Redux, Vue.JS, and Node.JS. Check out my latest web software development portfolio projects." | ||
} | ||
] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const filename = path.basename(__filename, '.js'); | ||
const model = require('../models/' + filename); | ||
|
||
module.exports = { | ||
get_all: (find) => { | ||
return model | ||
.find(find); | ||
} | ||
}; |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict'; | ||
|
||
const mongoose = require('mongoose'); | ||
const path = require('path'); | ||
const filename = path.basename(__filename, '.js'); | ||
|
||
const schema = new mongoose.Schema( | ||
{ | ||
name: { | ||
type: String, | ||
lowercase: true, | ||
trim: true, | ||
require: true | ||
}, | ||
title: { | ||
type: String, | ||
trim: true, | ||
require: true | ||
}, | ||
description: { | ||
type: String, | ||
trim: true, | ||
require: true | ||
} | ||
}, | ||
{ | ||
timestamps: true, | ||
collection: filename, | ||
toJSON: { virtuals: true }, | ||
toObject: { virtuals: true } | ||
} | ||
); | ||
|
||
module.exports = mongoose.model(filename, schema); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
|
||
const express = require('express'); | ||
const routes = express.Router(); | ||
const path = require('path'); | ||
const filename = path.basename(__filename, '.js'); | ||
const dbs = require('../dbs/' + filename); | ||
const services = require('../services/' + filename)(dbs); | ||
const utils = require('../libs/utils'); | ||
|
||
// Return the list of all the articles | ||
routes.route('/').get(async (request, response) => { | ||
const params = {}; | ||
utils.add_name_filter(params, 'name', request.query.name); | ||
const datas = await services.get_all(params); | ||
response.json(datas); | ||
}); | ||
|
||
module.exports = routes; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
|
||
module.exports = dbs => ({ | ||
get_all: async (params) => { | ||
return dbs.get_all(params); | ||
} | ||
}); |
Oops, something went wrong.