Browse Source

Merge branch 'main' into production

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

.env → .env.example View File


+ 1
- 0
.gitignore View File

@ -21,3 +21,4 @@ pnpm-debug.log*
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
.env

+ 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); Vue.use(Toast, options);
//Production variables //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({ new Vue({
router, router,


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

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


+ 7
- 0
static.json View File

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

Loading…
Cancel
Save