{"id":18315541,"url":"https://github.com/mathieutu/vue-cli-plugin-express","last_synced_at":"2025-10-27T18:14:35.536Z","repository":{"id":37692640,"uuid":"151397583","full_name":"mathieutu/vue-cli-plugin-express","owner":"mathieutu","description":"Deploy your Vue application and add your own routes with 2 click !","archived":false,"fork":false,"pushed_at":"2022-12-10T17:16:39.000Z","size":924,"stargazers_count":50,"open_issues_count":26,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T16:05:55.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathieutu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-03T10:45:51.000Z","updated_at":"2023-06-29T13:24:00.000Z","dependencies_parsed_at":"2023-01-26T04:30:16.623Z","dependency_job_id":null,"html_url":"https://github.com/mathieutu/vue-cli-plugin-express","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieutu%2Fvue-cli-plugin-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieutu%2Fvue-cli-plugin-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieutu%2Fvue-cli-plugin-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieutu%2Fvue-cli-plugin-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathieutu","download_url":"https://codeload.github.com/mathieutu/vue-cli-plugin-express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251886825,"owners_count":21659934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T16:41:31.184Z","updated_at":"2025-10-27T18:14:35.434Z","avatar_url":"https://github.com/mathieutu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-cli-plugin-express\n\n[![npm](https://img.shields.io/npm/v/vue-cli-plugin-express.svg) ![npm](https://img.shields.io/npm/dt/vue-cli-plugin-express.svg)](https://www.npmjs.com/package/vue-cli-plugin-express)\n[![vue-cli3](https://img.shields.io/badge/vue--cli-3.x-brightgreen.svg)](https://github.com/vuejs/vue-cli)\n\n**:rocket: Add an API in your Vue application in 2 minutes!**\n\nThis is a vue-cli 3.x plugin to add an Node Express server in your Vue project.\n\n\u003cbr\u003e\n\n![screenshot](./screenshot.png)\n\n\u003cbr\u003e\n\n**:star: Features:**\n\n- Included fully customizable Express Server:\n  - Just add your api routes into your project (with import/export support) without thinking to something else.\n  - Optional automatic fallback to the Vue app, to serve both the api and the application with only one command. \n  - Optional socket.io support.\n- (soon) Included optional example routes and components.\n\n## Table of contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Injected Commands](#injected-commands)\n- [Configuration](#configuration)\n- [Use your app in production](#use-your-app-in-production)\n\n---\n\n## Getting started\n\n:warning: Make sure you have vue-cli 3.x.x:\n\n```\nvue --version\n```\n\nIf you don't have a project created with vue-cli 3.x yet:\n\n```\nvue create my-new-app\n```\n\nNavigate to the newly created project folder and add the cli plugin:\n\n```\ncd my-new-app\nvue add express\n```\nSoon:\n*:information_source: An example `APIExample.vue` component will be added into your sources if you chose to include the examples.*\n\n## Usage\n\nTo start your server for development purpose, use this commands:\n\n```\nyarn express\n```\n\nThe server will be automatically restarted when a change is detected.\n\nYou just then have to start the app:\n\n```\nyarn serve\n```\n\nTo run the server only once for production use, run:\n```\nyarn express:run\n```\n\n**Updating `vue-cli-plugin-express` will update the Express server service :+1:**\n\n## Injected Commands\n\n- **`vue-cli-service express:watch`**\n\n  Run the Express server with info from `./srv` and watch the files to restart itself automatically.\n\n- **`vue-cli-service express:run`**\n\n  Run the Express server with info from `./srv` once.\n\n## Configuration\n\nThe Express Server can be configured via the `pluginOptions` in `vue.config.js`:\n\n```js\nmodule.exports = {\n  // Other options...\n  pluginOptions: {\n    // Express-related options\n    express: {\n        shouldServeApp: true,\n        serverDir: './srv',\n      },\n    },\n  },\n}\n```\n\n## Use your app in production\n\nMove `@vue/cli-service` from `devDependencies`to `dependencies`.\n\nExecute the following commands:\n```bash\nyarn build\nyarn express:run\n```\n\nFor most of cloud hosting services, you can add a `start` command that will be triggered automatically:\n```json\n{\n  \"scripts\": {\n    \"start\": \"yarn express:run\" \n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieutu%2Fvue-cli-plugin-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieutu%2Fvue-cli-plugin-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieutu%2Fvue-cli-plugin-express/lists"}