Restructure static files and main script file
|
@ -2,7 +2,7 @@
|
|||
"name": "keyoxide-web",
|
||||
"version": "3.3.0",
|
||||
"description": "A modern, secure and privacy-friendly platform to establish your decentralized online identity",
|
||||
"main": "index.js",
|
||||
"main": "./src/index.js",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"ajv": "^8.6.3",
|
||||
|
|
|
@ -33,19 +33,19 @@ import { stringReplace } from 'string-replace-middleware'
|
|||
import * as pug from 'pug'
|
||||
import 'dotenv/config.js'
|
||||
|
||||
import apiRoute from './routes/api.js'
|
||||
import mainRoute from './routes/main.js'
|
||||
import profileRoute from './routes/profile.js'
|
||||
import staticRoute from './routes/static.js'
|
||||
import utilRoute from './routes/util.js'
|
||||
import apiRoute from '../routes/api.js'
|
||||
import mainRoute from '../routes/main.js'
|
||||
import profileRoute from '../routes/profile.js'
|
||||
import staticRoute from '../routes/static.js'
|
||||
import utilRoute from '../routes/util.js'
|
||||
|
||||
const app = express()
|
||||
const packageData = JSON.parse(readFileSync('./package.json'))
|
||||
|
||||
app.set('env', process.env.NODE_ENV || "production")
|
||||
app.set('env', process.env.NODE_ENV || 'production')
|
||||
app.engine('pug', pug.__express).set('view engine', 'pug')
|
||||
app.set('port', process.env.PORT || 3000)
|
||||
app.set('domain', process.env.DOMAIN || "keyoxide.org")
|
||||
app.set('domain', process.env.DOMAIN || 'keyoxide.org')
|
||||
app.set('keyoxide_version', packageData.version)
|
||||
app.set('onion_url', process.env.ONION_URL)
|
||||
|
||||
|
@ -69,8 +69,8 @@ app.use(stringReplace({
|
|||
}))
|
||||
|
||||
// Routes
|
||||
app.use('/favicon.svg', express.static('favicon.svg'))
|
||||
app.use('/robots.txt', express.static('robots.txt'))
|
||||
app.use('/favicon.svg', express.static('../static/favicon.svg'))
|
||||
app.use('/robots.txt', express.static('../static/robots.txt'))
|
||||
|
||||
app.use('/', mainRoute)
|
||||
app.use('/api', apiRoute)
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
static-src/files/img/alert-circle.png
Normal file
After Width: | Height: | Size: 775 B |
BIN
static-src/files/img/alert-decagram.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
static-src/files/img/avatar_placeholder.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
102
static-src/files/img/background.svg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
static-src/files/img/check-decagram.png
Normal file
After Width: | Height: | Size: 922 B |
BIN
static-src/files/img/cogs.png
Normal file
After Width: | Height: | Size: 971 B |
BIN
static-src/files/img/decagram.png
Normal file
After Width: | Height: | Size: 790 B |
BIN
static-src/files/img/fingerprint.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
static-src/files/img/information.png
Normal file
After Width: | Height: | Size: 778 B |
BIN
static-src/files/img/key.png
Normal file
After Width: | Height: | Size: 653 B |
BIN
static-src/files/img/link.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
static-src/files/img/logo.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
static-src/files/img/logo_96.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
static-src/files/img/logo_circle.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
static-src/files/img/qrcode.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
static-src/files/img/shield-link.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
static-src/files/img/shield-search.png
Normal file
After Width: | Height: | Size: 978 B |