1

I have Vue app, created with vue-cli. This is semi-developed application. I want show to customer what we have now. So, I want to deploy what we have.

If I run script npm run build can I continue project development after building? What best practices for deploying not finished app?

P. S. I'm new in vue. I know, that my question can be stupid. Anyway, do not place minuses, please.

1
  • Just google it.... Commented Dec 25, 2017 at 18:08

2 Answers 2

2

You need to buy a vps hosting and install node.js. That's all, you can deploy your app.
Also you can make a simple back-end on node+express and put there your 'dist' folder after npm run build and this will be your demo app.

Sign up to request clarification or add additional context in comments.

5 Comments

I know about VPS, and I have it already. VPS configured for vue.js. If i understand correct, "npm run build" command modifies index.html for production. But, I want continue develop project after publishing on my local machine. Can I do it?
Of course you can. npm run build just creating a new uglified front-end of your project, which you can use for production. Just in production server copy dist folder and set this as a static files(with express like app.use(express.static(path.join(__dirname, '../dist')));). If you want, I can show you how I did this with my project.
many thanks for explanation. I built project and uploaded it to VPS, but without express.static. Anyway, all working normal. And can I asking you about another nooby question? What about global variables? For example,I have front-end, developed with VUE and service part, developed with Python. Is it possible store service connection URL in global variable? This is data must be acceptable even client closes browser.With other words,if I close browser and open it at next time I will be able get data from service by URL stored in variable.
@Alex Do you mean API? If you want to get data from your server anytime you just need to add get request handler in your server, php: php.net/manual/en/reserved.variables.get.php. If you mean temporary data for browsers use cookies
No, I mean another think. I found decision here: link
2

Yes. npm run build will build and package your app into the dist folder. Everything under your src folder will remain as it is. You can continue working on your app normally and build it as often as you want. There aren't really best practices for this. I would just make sure it doesn't touch production data until it's actually ready.

1 Comment

@lamemeon, thank you for answer. This is what I want read exactly!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.