├── .babelrc
├── .editorconfig
├── .eslintrc.js
├── .gitignore
├── .prettierrc
├── README.md
├── client
├── assets
│ └── README.md
├── components
│ ├── Logo.spec.js
│ ├── Logo.vue
│ └── README.md
├── layouts
│ ├── README.md
│ └── default.vue
├── middleware
│ └── README.md
├── pages
│ ├── README.md
│ └── index.vue
├── plugins
│ └── README.md
├── static
│ ├── README.md
│ └── favicon.ico
└── store
│ └── README.md
├── jest-server.config.js
├── jest.config.js
├── jsconfig.json
├── nuxt.config.js
├── package-lock.json
├── package.json
├── server
├── nest.ts
├── src
│ ├── app.controller.spec.ts
│ ├── app.controller.ts
│ ├── app.module.ts
│ ├── app.service.ts
│ └── main.ts
└── test
│ ├── app.e2e-spec.ts
│ └── jest-e2e.json
├── tsconfig-server.json
├── tsconfig.build.json
└── tsconfig.json
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "test": {
4 | "presets": [
5 | [
6 | "@babel/preset-env",
7 | {
8 | "targets": {
9 | "node": "current"
10 | }
11 | }
12 | ]
13 | ]
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | browser: true,
5 | node: true
6 | },
7 | extends: [
8 | '@nuxtjs/eslint-config-typescript',
9 | 'plugin:prettier/recommended',
10 | 'plugin:nuxt/recommended'
11 | ],
12 | plugins: [],
13 | // add your custom rules here
14 | rules: {
15 | 'no-useless-constructor': 'off',
16 | '@typescript-eslint/interface-name-prefix': 'off',
17 | '@typescript-eslint/explicit-function-return-type': 'off',
18 | '@typescript-eslint/explicit-module-boundary-types': 'off',
19 | '@typescript-eslint/no-explicit-any': 'off'
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 | coverage-client
22 | coverage-server
23 |
24 | # nyc test coverage
25 | .nyc_output
26 |
27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28 | .grunt
29 |
30 | # Bower dependency directory (https://bower.io/)
31 | bower_components
32 |
33 | # node-waf configuration
34 | .lock-wscript
35 |
36 | # Compiled binary addons (https://nodejs.org/api/addons.html)
37 | build/Release
38 |
39 | # Dependency directories
40 | node_modules/
41 | jspm_packages/
42 |
43 | # TypeScript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # parcel-bundler cache (https://parceljs.org/)
65 | .cache
66 |
67 | # next.js build output
68 | .next
69 |
70 | # nuxt.js build output
71 | .nuxt
72 |
73 | # nest.js build output
74 | .nest
75 |
76 | # Nuxt generate
77 | dist
78 |
79 | # vuepress build output
80 | .vuepress/dist
81 |
82 | # Serverless directories
83 | .serverless
84 |
85 | # IDE / Editor
86 | .idea
87 |
88 | # Service worker
89 | sw.*
90 |
91 | # macOS
92 | .DS_Store
93 |
94 | # Vim swap files
95 | *.swp
96 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "none",
3 | "semi": true,
4 | "arrowParens": "always",
5 | "singleQuote": true
6 | }
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # nuxtjs-nestjs-integration
2 | This is a sample application that brings Nuxt.js and Nest.js together.
3 |
4 | ## Build Setup
5 |
6 | ```bash
7 | # install dependencies
8 | $ npm install
9 |
10 | # run tests
11 | $ npm run test:client (client only)
12 | $ npm run test:server (server only)
13 | $ npm run test:e2e (end to end server tests)
14 | $ npm run test (all)
15 |
16 | # serve with hot reload at localhost:3000 (client) and localhost:4000 (server)
17 | $ npm run dev:server
18 | $ npm run dev
19 |
20 | # build for production and launch server
21 | $ npm run build
22 | $ npm run start
23 |
24 | # generate static project
25 | $ npm run generate
26 | ```
27 |
28 | For detailed explanation on how this was setup, check out this [post](https://davidjamesherzog.github.io/2021/03/28/nuxtjs-nestjs-integration/).
29 |
--------------------------------------------------------------------------------
/client/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
8 |
--------------------------------------------------------------------------------
/client/components/Logo.spec.js:
--------------------------------------------------------------------------------
1 | import { mount } from '@vue/test-utils';
2 | import Logo from './Logo.vue';
3 |
4 | describe('Logo', () => {
5 | test('is a Vue instance', () => {
6 | const wrapper = mount(Logo);
7 | expect(wrapper.vm).toBeTruthy();
8 | });
9 | });
10 |
--------------------------------------------------------------------------------
/client/components/Logo.vue:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
36 |
--------------------------------------------------------------------------------
/client/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/client/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/client/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
56 |
--------------------------------------------------------------------------------
/client/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/client/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/client/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |