Updated vue CLI to latest version

Added cycle tracking base
This commit is contained in:
Max committed 2022-10-13 19:28:35 +00:00
1 parent b51e5ac0d0
commit 1a6a7bdfd4
35 files changed
+17320 -9045

No files matched your search

+15 -7
View File
@@ -1,7 +1,12 @@
//Set up environmental variables, pulled from .env file used as process.env.DB_HOST
//Set up environmental variables, pulled from ~/.env file used as process.env.DB_HOST
const os = require('os') //Used to get path of home directory
const result = require('dotenv').config({ path:(os.homedir()+'/.env') })
const ports = {
express: 3000,
socketIo: 3001
}
//Allow user of @ in in require calls. Config in package.json
require('module-alias/register')
@@ -15,7 +20,6 @@ const helmet = require('helmet')
const express = require('express')
const app = express()
app.use( helmet() )
const port = 3000
//
@@ -230,8 +234,8 @@ io.on('connection', function(socket){
});
http.listen(3001, function(){
console.log('socket.io liseting on port 3001');
http.listen(ports.socketIo, function(){
console.log(`Socke.io: Listening on port ${ports.socketIo}!`)
});
//Enable json body parsing in requests. Allows me to post data in ajax calls
@@ -285,7 +289,7 @@ UserTest.keyPairTest('genMan30', '1', printResults)
})
//Test
app.get('/api', (req, res) => res.send('Solidscribe API is up and running'))
app.get('/api', (req, res) => res.send('Solidscribe /API is up and running'))
//Serve up uploaded files
app.use('/api/static', express.static( __dirname+'/../staticFiles' ))
@@ -314,9 +318,13 @@ app.use('/api/attachment', attachment)
var quickNote = require('@routes/quicknoteController')
app.use('/api/quick-note', quickNote)
//cycle tracking endpoint
var cycleTracking = require('@routes/cycletrackingController')
app.use('/api/cycle-tracking', cycleTracking)
//Output running status
app.listen(port, () => {
console.log(`Listening on port ${port}!`)
app.listen(ports.express, () => {
console.log(`Express: Listening on port ${ports.express}!`)
})
//