Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example #22

Open
martinjoubert opened this issue Jan 20, 2018 · 1 comment
Open

Example #22

martinjoubert opened this issue Jan 20, 2018 · 1 comment

Comments

@martinjoubert
Copy link

Hi,

Could you please describe how to develop an app with Polyonic from coding to deploying?
I think this framework is really promising but I need to run a complete example before using it.

Gaël

@Leo1305Pineda
Copy link

Leo1305Pineda commented Jan 15, 2020

As it is integrated with ionic look for the documentation of ionicframework if what you are looking for is to build ios or android platform use the commands ionic cordova build [android | ios] --prod. if what you want is a web application just by building the project with ionic build --prod and placing this directory to serve, if it is a desktop application with npm run electron: [linux | windows | mac]

Commands Quick start step to step

desploy web on gcloud (prerequisite: to config gcloud)
git clone https://github.com/paulsutherland/Polyonic.git && cd Polyonic && npm install
gcloud beta compute --project ID_PROJECT ssh USER@INSTANCE --command="cd /var/www/html/Polyonic && rm -R www" --zone us-central1-a ionic build --prod
gcloud beta compute scp --recurse $PWA/www/ USER@INSTANCE:/var/www/html/Polyonic --zone us-central1-a --project ID_PROJECT

Or Deploy web on heroku with node (prerequisite: to config heroku)

nano server.js

To aggregate this:

`const express = require('express');
const path = require('path');
const port = process.env.PORT || 8080;
const compression = require('compression');
const app = express();

app.use(compression());

app.use(express.static(__dirname + '/www'));

app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+'/www/index.html'));
});

app.listen(port);
console.log(RUNNING ON PORT ${port});
`

Ctrl + o and Ctrl + x

And to add line script package.json

scripts: { server: "ionic build --prod && node server.js" }

Deploy

heroku local web
heroku login
heroku create
git push heroku master

Config heroku to run script

npm run server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants