最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

npm - How can I create a build from a JavaScript file based on node modules? - Stack Overflow

programmeradmin1浏览0评论

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(`
发布评论

评论列表(0)

  1. 暂无评论