Move back to heroku

This commit is contained in:
Trevor Blades
2020-02-26 20:02:44 -08:00
parent bb58dcff32
commit 357e6acf41
7 changed files with 1027 additions and 283 deletions

1
.gitignore vendored
View File

@@ -1,2 +1 @@
node_modules
.netlify

1
Procfile Normal file
View File

@@ -0,0 +1 @@
web: node index.js

View File

@@ -1 +0,0 @@
/ /.netlify/functions/graphql 200!

View File

@@ -1,5 +1,5 @@
const provinces = require('provinces');
const {ApolloServer, gql} = require('apollo-server-lambda');
const {ApolloServer, gql} = require('apollo-server');
const {continents, countries, languages} = require('countries-list');
const typeDefs = gql`
@@ -136,8 +136,6 @@ const server = new ApolloServer({
}
});
exports.handler = server.createHandler({
cors: {
origin: '*'
}
server.listen().then(({url}) => {
console.log(`🚀 Server ready at ${url}`);
});

View File

@@ -1,3 +0,0 @@
[build]
command = "noop"
functions = "functions"

1291
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
{
"scripts": {
"start": "nodemon index.js",
"pretest": "eslint functions",
"test": "echo \"Error: no test specified\" && exit"
},
@@ -7,7 +8,7 @@
"extends": "@trevorblades"
},
"dependencies": {
"apollo-server-lambda": "^2.10.0",
"apollo-server": "^2.10.1",
"countries-list": "^2.4.3",
"graphql": "^14.6.0",
"provinces": "^1.11.0"
@@ -16,6 +17,6 @@
"@trevorblades/eslint-config": "^7.0.1",
"apollo": "^2.16.0",
"eslint": "^6.2.1",
"noop-cli": "^1.0.0"
"nodemon": "^2.0.2"
}
}