11 |
12 | ## Project boostrap built with:
13 |
14 | - React.js
15 | - Next.js
16 | - Typescript
17 | - SCSS
18 | - Apollo
19 | - GraphQl
20 | - EsLint
21 | - Prettier
22 | - Jest
23 | - Nodemon
24 | - Typegoose
25 | - Type-graphql
26 |
27 | ## How to use
28 |
29 | ```javascript
30 | npm i
31 | npm run dev
32 | ```
33 |
34 | ## Environment variables
35 |
36 | You can access your .env variables by deconstructing 'process.env' object, both on client and server.
37 | Just make sure that you reboot the server when updating .env file.
38 |
39 | ## Configuration
40 |
41 | You should configure things like eslint, tsconfig, prettier etc. with things that suit you and your project.
42 | Configuration in this project is not perfect - it's just my own preference, and I'm open to suggestions :)
43 |
44 | ## To see before coding;
45 |
46 | - [Check out this to read more about /server/graphql workings](https://github.com/Urigo/merge-graphql-schemas)
47 | - [Context management choice](https://www.youtube.com/watch?v=Q54YDGC_t3Y)
48 | - [Apollo context management](https://www.apollographql.com/docs/react/data/local-state/)
49 |
--------------------------------------------------------------------------------
/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Head from 'next/head'
3 | import Nav from '@views/components/Nav'
4 | import Footer from '@views/components/Footer'
5 |
6 | const Home = () => (
7 |
8 |
9 | Home
10 |
11 |
12 |
13 |
14 |
15 |
16 |
Welcome to Next.js!
17 |
18 | To get started, edit pages/index.js and save to reload.{' '}
19 |
20 | Good Luck with your project :) -Sebastian
21 |