Skip to content

Commit 9b1cd46

Browse files
committed
Agregando variables de entorno
1 parent f4399fd commit 9b1cd46

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { ApolloServer } from "apollo-server-express";
33
import { resolvers } from "./data/resolvers";
44
import { typeDefs } from "./data/schemas";
55
require("./data/db");
6+
require("dotenv").config();
67

78
const app = express();
8-
const numeroPuerto = 9000;
9+
const numeroPuerto = process.env.PORT;
910

1011
app.get("/", (req, res) => {
1112
res.send("Plantilla del servidor para Netlify y GatsbyJS");

package-lock.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"babel-cli": "^6.26.0",
1919
"babel-preset-env": "^1.7.0",
2020
"babel-preset-stage-0": "^6.24.1",
21+
"dotenv": "^8.2.0",
2122
"express": "^4.17.1",
2223
"graphql": "^14.5.8",
2324
"graphql-import": "^0.7.1",

0 commit comments

Comments
 (0)