Skip to content

Commit d13eff6

Browse files
authored
Merge pull request #13 from OrcaPracticas/add/crud
βš™οΈ Desarrollo de crud
2 parents 429f157 + 48d9afa commit d13eff6

163 files changed

Lines changed: 337 additions & 43 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.babelrc.jsβ€Ž

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
const ENV = require("./app/config/env-config");
22

33
module.exports = {
4-
presets: ["@babel/preset-env"],
4+
presets: [
5+
[
6+
'@babel/preset-env',
7+
{
8+
targets: {
9+
esmodules: true,
10+
},
11+
},
12+
],
13+
],
514
plugins: [
615
"inline-json-import",
716
"@babel/plugin-proposal-class-properties",
17+
"@babel/plugin-proposal-private-methods",
818
[
919
"module-resolver",
1020
{
1121
alias: {
12-
"Controller": "./app/src/controller/",
22+
"Controllers": "./app/src/controllers/",
1323
"Models": "./app/src/models/",
1424
"Tools": "./app/src/tools/",
1525
}

β€Žapp/config/env-config.jsβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const APP_PORT = process.env.PORT || 3000;
22

3-
const USER_DB = process.env.USER_DB || "pokemon";
4-
const PASS = process.env.PASS || "p0k3m0n.";
5-
const DB = process.env.DB || "api";
3+
const { USER_DB, PASS, DB, HEROKU } = process.env;
4+
const HOST = HEROKU || `http://localhost:${APP_PORT}`;
65

76
// variables de entorno
87
module.exports = {
9-
"process.env.PORT": APP_PORT,
8+
"process.env.APP_PORT": APP_PORT,
109
"process.env.ODBC": `mongodb+srv://${USER_DB}:${PASS}@cluster0-eke4y.mongodb.net/${DB}?retryWrites=true&w=majority`,
10+
"process.env.HOST": HOST,
1111
"process.env.CONFIG": {
1212
useNewUrlParser: true,
1313
useUnifiedTopology: true,
1414
},
15-
};
15+
};
1.57 MB
Binary file not shown.

β€Žapp/public/pokemons/abra.jpgβ€Ž

26.6 KB
16.5 KB
39.3 KB
23.4 KB
37.6 KB
44.9 KB
31.7 KB

0 commit comments

Comments
Β (0)