Verified Commit 5cbf0ac6 authored by Aral Balkan's avatar Aral Balkan

Merge branch 'source-directory-refactor'

Moved all Nuxt/Vue code to client/ and all FeathersJS/Express code to server/
parents eee06092 7eb8921d
......@@ -71,7 +71,7 @@
<script>
import vueColorCompact from '~/node_modules/vue-color/src/components/Compact.vue'
import vueColorCompact from '~/../node_modules/vue-color/src/components/Compact.vue'
export default {
components: {
......
const path = require('path')
module.exports = {
// The Nuxt/Vue client source is in the client/ folder
srcDir: 'client/',
loading: {
color: '#92D3CE'
},
......
......@@ -23,7 +23,7 @@
},
"scripts": {
"build": "nuxt build",
"dev": "DEBUG=nuxt:* nodemon --watch server/ --watch config/ server/index.js",
"dev": "DEBUG=nuxt:* nodemon --watch client/ --watch server/ --watch config/ --watch nuxt.config.js server/index.js",
"prestart": "npm run build",
"start": "NODE_ENV=production node server/",
"test": "npm run -s mocha",
......
const path = require('path')
const favicon = require('serve-favicon')
// const path = require('path')
// const favicon = require('serve-favicon')
const compress = require('compression')
const cors = require('cors')
const helmet = require('helmet')
let logger = require('winston')
const feathers = require('@feathersjs/feathers')
const path = require('path')
// Set the Node configuration directory to server/config instead of the default
// config/ as the configuration files are for the FeathersJS server, not for
// the Nuxt/Vue client. (We must do this before requring @feathersjs/configuration
// as that uses the node-config module that uses this environment variable. See
// https://github.com/lorenwest/node-config/wiki/Configuration-Files for further
// information on this.)
process.env['NODE_CONFIG_DIR'] = path.join(__dirname, 'config/')
const configuration = require('@feathersjs/configuration')
const express = require('@feathersjs/express')
const primus = require('@feathersjs/primus')
......@@ -40,7 +51,7 @@ if (process.env.NODE_ENV !== 'test') {
}
app.use(express.urlencoded({ extended: true }))
app.use(favicon(path.join(app.get('public'), 'favicon.ico')))
// app.use(favicon(path.join(app.get('public'), 'favicon.ico')))
// Host the public folder
// app.use('/', express.static(app.get('public')))
......
......@@ -24,6 +24,6 @@ process.on('nuxt:build:done', (err) => {
const server = app.listen(port)
server.on('listening', () => {
logger.info(`Feathers application started on ${app.get('host')}:${port}`)
console.log(`🎈 Indie Site started on http://${app.get('host')}:${port}`)
})
})
......@@ -10,7 +10,10 @@
// @ts-check
const { ContentType } = require('../lib/http-constants')
const siteConfiguration = require('../../assets/data.json')
// TODO: Refactor (the data file will be moved to the person’s home directory
// – see: https://source.ind.ie/indienet/site/issues/20)
const siteConfiguration = require('../../client/assets/data.json')
const domain = siteConfiguration.domain
const url = `https://${domain}/`
......
const { ContentType, HTTPStatusCode } = require('../../lib/http-constants')
const { domain } = require('../../../assets/data.json')
// TODO: Refactor (the data file will be moved to the person’s home directory
// – see: https://source.ind.ie/indienet/site/issues/20)
const { domain } = require('../../../client/assets/data.json')
module.exports = (request, response, activityStreamsObject, addWebfingerLink = false) => {
const writeResponse = () => {
......
// @ts-check
const winston = require('../../lib/log') // eslint-disable-line no-unused-vars
const siteConfiguration = require('../../../assets/data.json')
// TODO: Refactor (the data file will be moved to the person’s home directory
// – see: https://source.ind.ie/indienet/site/issues/20)
const siteConfiguration = require('../../../client/assets/data.json')
class Service {
constructor (options) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment