在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):garganurag893/Next.js_GraphQL_Express_Apollo_Boilerplate开源软件地址(OpenSource Url):https://github.com/garganurag893/Next.js_GraphQL_Express_Apollo_Boilerplate开源编程语言(OpenSource Language):TypeScript 84.5%开源软件介绍(OpenSource Introduction):Next.js React GraphQL Express Apollo BoilerplatePerformance oriented Next.js and React.js application boilerplate with Typescript, Express.js, GraphQL, Apollo and Sass Table of ContentsInstallationClone this repo to your local machine using Step 1: Set up the Development EnvironmentYou need to set up your development environment before you can do anything. Install Node.js and NPM
Install yarn globally yarn global add yarn
Install MongoDB Once Brew is installed, it is time to install MongoDB by issuing the following command on the Terminal: brew install mongodb Step 2: Set up EnvOpen .env file in a editor and add your configuration for database and other required fields. NODE_ENV = development;
JWT_SECRET = "somesuperkey";
DB =
"mongodb://localhost/nextjs_graphql_express_apollo_boilerplate_development";
PORT = 4020; Step 3: Install dependenciesNavigate to the server, nextjs and react app directories and run the below command: $ yarn Step 4: Running LocallyNavigate to the Express Server directory and run the below command in your terminal : $ yarn start Now navigate to Nextjs App directory and run the below command in your terminal : $ yarn dev Now navigate to React App directory and run the below command in your terminal : $ yarn start Step 5: DeploymentTo deploy with ZEIT Now through your terminal, you will need to install Now CLI, a frequently updated, and open-source, command-line interface. You can get Now CLI from either npm or Yarn. Using npm, run the following command from your terminal: $ npm i -g now To verify that you have installed Now CLI, try running now help from your terminal. With Now CLI installed, you can now login using the following command: $ now login Navigate to Nextjs App directory and run the below commands in order : $ now Once deployed, you will get a preview URL that is assigned on each deployment to share the latest changes under the same address. FeaturesGraphQLGraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. ExpressExpress is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. Next.jsNext.js extends React to provide a powerful method for loading a page's initial data, no matter where it is coming from. With a single place to prepopulate page context, server-side rendering with Next.js seamlessly integrates with any existing data-fetching strategy. ReactReact makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. React ApolloReact Apollo allows you to fetch data from your GraphQL server and use it in building complex and reactive UIs using the React framework. React Apollo may be used in any context that React may be used. In the browser, in React Native, or in Node.js when you want to do server-side rendering. TypescriptTypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. TypeScript is designed for development of large applications and transcompiles to JavaScript. JsonWebTokenJSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. TSLintTSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors HuskyHusky can prevent bad git commit, git push and more |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论