Home > database >  How can I create a build from a JavaScript file based on node modules?
How can I create a build from a JavaScript file based on node modules?

Time:03-25

I created a new node project using

npm init
npm install apollo-server

I then added a index.js file with the following code:

const { ApolloServer, gql } = require('apollo-server');

const typeDefs = gql`
  type Query {
    hello: String
  }
`;

const server = new ApolloServer({
  typeDefs,
  mocks: true,
});

server.listen().then(({ url }) => {
  console.log(`           
  • Related