mirror of
https://github.com/FranP-code/countries.git
synced 2025-10-13 00:02:15 +00:00
Use a netlify lambda for the API
This commit is contained in:
17
index.js
17
index.js
@@ -1,17 +0,0 @@
|
||||
import resolvers from './resolvers';
|
||||
import typeDefs from './schema';
|
||||
import {ApolloServer} from 'apollo-server';
|
||||
|
||||
const server = new ApolloServer({
|
||||
typeDefs,
|
||||
resolvers,
|
||||
introspection: true,
|
||||
playground: true,
|
||||
engine: {
|
||||
apiKey: process.env.ENGINE_API_KEY
|
||||
}
|
||||
});
|
||||
|
||||
server.listen({port: process.env.PORT}).then(({url}) => {
|
||||
console.log(`🚀 Server ready at ${url}`);
|
||||
});
|
||||
Reference in New Issue
Block a user