Browse Source

Added travis yml

production
Yiğit Çolakoğlu 4 years ago
parent
commit
448bcbff04
7 changed files with 45 additions and 22 deletions
  1. +0
    -2
      .env
  2. +14
    -0
      .travis.yml
  3. +20
    -5
      server.js
  4. +0
    -11
      src/Patient.js
  5. +3
    -3
      src/main.js
  6. +1
    -1
      src/router/index.js
  7. +7
    -0
      static.json

+ 0
- 2
.env View File

@ -1,2 +0,0 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:9090

+ 14
- 0
.travis.yml View File

@ -0,0 +1,14 @@
language: java
jdk:
- oraclejdk11
branches:
only:
- production
deploy:
provider: heroku
app: metis-portal
on:
branch: production
api_key:
secure: qcl0sqtknlTJcqQEu0rRj70h4SaRjbq5jy6j7HOr+iQIt+tSM/S/nE9g3se8AvPuIuLgD4JFVPXvQKLdBSvf3djuA0eja35cO9FWx3YGJ5boYavj1gX00cTNZChrr5HyIKDLJ2eO6MoRiFuOjT5+lLQH0xnRF4fVf1CSC/YXy/yGt8MM7GHOIYIZn/admhvibSNd70F0XtUNTXX5a25TFvyXdUrbaKafsQUNsXVuQnJPbT2VrXK5mTQHj8XQXedQMuTCfplahpHjmBXFxMtbGuXLNNTK2DwSiiSV1N7ozA65v5/B2sYwq8VqSX8za/Wy74p3YZTpueNCdZN4DORxrKUT/JiMZv2l2rqUUQsd0QiEzMoyK5FopiuCiwSeHZe14TEpwKHYMYzjQNytUKYn5aGcBWQSAkT00cyHo3q+u637H1WckFmxUJYL9Gn4unp0RopcpMAPiGgddDdVgW3LMwrMvsbwPmJ5/eIb3arF5X1FievvygkcWDZmMezZix6t4LcxS96OmxbWRAf7BxvThMZmu2KdHT/1E40ekgLtpVKpI/rJnKsvO0jSvaKOmL4UwgPdT2u6PI9bVj7++vPK8ekeIT1tn1AuMzF/C0fwSIlVdX++LSiy9bKmpNrINqjKO5JogxKmiV6zeXTuNS/anRSJyC6ACqqp8yq0SagQ8pE=

+ 20
- 5
server.js View File

@ -1,5 +1,20 @@
var express = require('express');
var path = require('path');
var serveStatic = require('serve-static');app = express();
app.use(serveStatic(__dirname));var port = process.env.PORT || 5000;
app.listen(port);console.log('server started '+ port);
const http = require('http')
const fs = require('fs')
const httpPort = 80
http.createServer((req, res) => {
fs.readFile('index.html', 'utf-8', (err, content) => {
if (err) {
console.log('We cannot open "index.html" file.')
}
res.writeHead(200, {
'Content-Type': 'text/html; charset=utf-8'
})
res.end(content)
})
}).listen(httpPort, () => {
console.log('Server listening on: http://localhost:%s', httpPort)
})

+ 0
- 11
src/Patient.js View File

@ -1,11 +0,0 @@
export class Patient {
name;
phone;
safe;
constructor(name, phone, safe){
this.name = name;
this.phone = phone;
this.safe = safe;
}
}

+ 3
- 3
src/main.js View File

@ -14,9 +14,9 @@ const options = {
Vue.use(Toast, options);
//Production variables
Vue.config.productionTip = false
Vue.config.devtools = true
Vue.config.performance = true
//Vue.config.productionTip = false
//Vue.config.devtools = true
//Vue.config.performance = true
new Vue({
router,


+ 1
- 1
src/router/index.js View File

@ -24,7 +24,7 @@ const routes = [
]
const router = new VueRouter({
mode: 'hash',
mode: 'history',
base: process.env.BASE_URL,
routes
})


+ 7
- 0
static.json View File

@ -0,0 +1,7 @@
{
"root": "dist",
"clean_urls": true,
"routes": {
"/**": "index.html"
}
}

Loading…
Cancel
Save