-
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.
- Loading branch information
adrian_vidal
committed
Sep 22, 2021
1 parent
b3f27ea
commit eb4915a
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
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,16 @@ | ||
var express = require('express') | ||
var bodyParser = require('body-parser') | ||
|
||
var app = express() | ||
|
||
// Archivos de rutas | ||
|
||
// Middleware | ||
app.use(bodyParser.urlencoded({extended:false})) | ||
app.use(bodyParser.json()) | ||
|
||
// CORS | ||
|
||
// Rutas | ||
|
||
module.exports = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var mongoose = require('mongoose') | ||
var app = require('./app') | ||
var port = 3700 | ||
|
||
mongoose.Promise = global.Promise; | ||
mongoose.connect('mongodb://localhost:27017/portfolio') | ||
.then(() => { | ||
app.listen(port, () => { | ||
console.log('Servidor funcionando correctamente en la url: http://localhost/3700') | ||
}) | ||
}) | ||
.catch(err => console.log(err)) |
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 @@ | ||
var mongoose = require('mongoose') | ||
var Schema = mongoose.Schema | ||
|
||
var educationSchema = Schema({ | ||
name: String, | ||
description: String, | ||
startDate: String, | ||
endDate: String, | ||
icon: String | ||
}) | ||
|
||
module.exports = mongoose.model('Education', educationSchema) |
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,13 @@ | ||
var mongoose = require('mongoose') | ||
var Schema = mongoose.Schema() | ||
|
||
var jobSchema = Schema({ | ||
name: String, | ||
description: String, | ||
startDate: String, | ||
endDate: String, | ||
tecnologies: [String], | ||
icon: String | ||
}) | ||
|
||
module.exports = mongoose.model('Job', jobSchema) |
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 @@ | ||
var mongoose = require('mongoose') | ||
var Schema = mongoose.Schema | ||
|
||
var tecnologySchema = Schema({ | ||
name: String, | ||
description: String, | ||
state: String, | ||
category: String, | ||
icon: String | ||
}) | ||
|
||
module.exports = mongoose.model('Tecnology', tecnologySchema) |