diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..4c889e0 Binary files /dev/null and b/.DS_Store differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c133193 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 wazolab + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..580bbd7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" + +services: + nuxt: + build: ./nuxt + environment: + - HOST=0.0.0.0 + - PORT=3000 + ports: + - "3000:3000" + working_dir: /src + restart: always + command: sh -c "npm install && npm run dev" + volumes: + - ./nuxt:/src:cached + +volumes: + db_data: diff --git a/.babelrc b/nuxt/.babelrc similarity index 100% rename from .babelrc rename to nuxt/.babelrc diff --git a/.editorconfig b/nuxt/.editorconfig similarity index 100% rename from .editorconfig rename to nuxt/.editorconfig diff --git a/.gitignore b/nuxt/.gitignore similarity index 100% rename from .gitignore rename to nuxt/.gitignore diff --git a/nuxt/Dockerfile b/nuxt/Dockerfile new file mode 100644 index 0000000..3693b75 --- /dev/null +++ b/nuxt/Dockerfile @@ -0,0 +1,2 @@ + +FROM node:12.18.4 \ No newline at end of file diff --git a/nuxt/LICENSE b/nuxt/LICENSE new file mode 100644 index 0000000..c133193 --- /dev/null +++ b/nuxt/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 wazolab + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/nuxt/README.md b/nuxt/README.md new file mode 100644 index 0000000..ddedbb7 --- /dev/null +++ b/nuxt/README.md @@ -0,0 +1,23 @@ +# movie-finder + +## Build Setup + +```bash +# install dependencies +$ npm install + +# serve with hot reload at localhost:3000 +$ npm run dev + +# build for production and launch server +$ npm run build +$ npm run start + +# generate static project +$ npm run generate + +# start tests +$ npm run test +``` + +For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). diff --git a/assets/README.md b/nuxt/assets/README.md similarity index 100% rename from assets/README.md rename to nuxt/assets/README.md diff --git a/components/Logo.vue b/nuxt/components/Logo.vue similarity index 100% rename from components/Logo.vue rename to nuxt/components/Logo.vue diff --git a/components/README.md b/nuxt/components/README.md similarity index 100% rename from components/README.md rename to nuxt/components/README.md diff --git a/jest.config.js b/nuxt/jest.config.js similarity index 100% rename from jest.config.js rename to nuxt/jest.config.js diff --git a/jsconfig.json b/nuxt/jsconfig.json similarity index 100% rename from jsconfig.json rename to nuxt/jsconfig.json diff --git a/layouts/README.md b/nuxt/layouts/README.md similarity index 100% rename from layouts/README.md rename to nuxt/layouts/README.md diff --git a/layouts/default.vue b/nuxt/layouts/default.vue similarity index 100% rename from layouts/default.vue rename to nuxt/layouts/default.vue diff --git a/middleware/README.md b/nuxt/middleware/README.md similarity index 100% rename from middleware/README.md rename to nuxt/middleware/README.md diff --git a/nuxt.config.js b/nuxt/nuxt.config.js similarity index 62% rename from nuxt.config.js rename to nuxt/nuxt.config.js index 0da096a..514136a 100644 --- a/nuxt.config.js +++ b/nuxt/nuxt.config.js @@ -4,44 +4,38 @@ export default { // Global page headers (https://go.nuxtjs.dev/config-head) head: { - title: 'movie-finder', + title: "movie-finder", meta: [ - { charset: 'utf-8' }, - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - { hid: 'description', name: 'description', content: '' } + { charset: "utf-8" }, + { name: "viewport", content: "width=device-width, initial-scale=1" }, + { hid: "description", name: "description", content: "" } ], - link: [ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } - ] + link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }] }, // Global CSS (https://go.nuxtjs.dev/config-css) - css: [ - 'ant-design-vue/dist/antd.css' - ], + css: ["ant-design-vue/dist/antd.css"], // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins) - plugins: [ - '@/plugins/antd-ui' - ], + plugins: ["@/plugins/antd-ui"], // Auto import components (https://go.nuxtjs.dev/config-components) components: true, // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules) - buildModules: [ - ], + buildModules: [], // Modules (https://go.nuxtjs.dev/config-modules) modules: [ // https://go.nuxtjs.dev/axios - '@nuxtjs/axios', + "@nuxtjs/axios" ], // Axios module configuration (https://go.nuxtjs.dev/config-axios) - axios: {}, + axios: { + baseURL: "http://localhost:3000" + }, // Build Configuration (https://go.nuxtjs.dev/config-build) - build: { - } -} + build: {} +}; diff --git a/package-lock.json b/nuxt/package-lock.json similarity index 100% rename from package-lock.json rename to nuxt/package-lock.json diff --git a/package.json b/nuxt/package.json similarity index 62% rename from package.json rename to nuxt/package.json index 74b5510..555369b 100644 --- a/package.json +++ b/nuxt/package.json @@ -1,11 +1,13 @@ { "name": "movie-finder", "version": "1.0.0", + "description": "Nuxt.js test project for LoveToKnow Media job opportunity.", + "author": "NoƩ Viricel ", "private": true, "scripts": { - "dev": "nuxt", - "build": "nuxt build", - "start": "nuxt start", + "dev": "NODE_ENV=development nuxt", + "build": "NODE_ENV=production nuxt build", + "start": "NODE_ENV=production nuxt start", "generate": "nuxt generate", "test": "jest" }, diff --git a/pages/README.md b/nuxt/pages/README.md similarity index 100% rename from pages/README.md rename to nuxt/pages/README.md diff --git a/pages/index.vue b/nuxt/pages/index.vue similarity index 79% rename from pages/index.vue rename to nuxt/pages/index.vue index 1e6d2ef..91e6668 100644 --- a/pages/index.vue +++ b/nuxt/pages/index.vue @@ -2,9 +2,7 @@
-

- movie-finder -

+

movie-finder