aboutsummaryrefslogtreecommitdiff
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/Dockerfile14
-rw-r--r--bridge/ecosystem.config.js12
-rw-r--r--bridge/index.js25
-rw-r--r--bridge/webpack.config.js70
4 files changed, 0 insertions, 121 deletions
diff --git a/bridge/Dockerfile b/bridge/Dockerfile
deleted file mode 100644
index ef79431f..00000000
--- a/bridge/Dockerfile
+++ /dev/null
@@ -1,14 +0,0 @@
-FROM keymetrics/pm2:18-alpine
-
-# Bundle APP files
-COPY public/bridge.js .
-COPY bridge/ecosystem.config.js .
-
-# Install app dependencies
-ENV NPM_CONFIG_LOGLEVEL warn
-ENV DEBUG http
-
-# Expose the listening port of your app
-EXPOSE 8081
-
-CMD [ "pm2-runtime", "start", "ecosystem.config.js", "--env", "production" ]
diff --git a/bridge/ecosystem.config.js b/bridge/ecosystem.config.js
deleted file mode 100644
index 40073998..00000000
--- a/bridge/ecosystem.config.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = {
- apps : [{
- name: 'bridge',
- script: './bridge.js',
- env: {
- NODE_ENV: 'development',
- },
- env_production: {
- NODE_ENV: 'production',
- }
- }]
- }
diff --git a/bridge/index.js b/bridge/index.js
deleted file mode 100644
index 727bd395..00000000
--- a/bridge/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import express from 'express'
-import { raw } from 'body-parser'
-import cors from 'cors'
-import debug from 'debug'
-const log = debug('http')
-
-import oembed from '../vnext/server/middleware/oembed'
-
-const app = express()
-app.use(raw())
-app.use(cors())
-const router = express.Router()
-
-router.get('/oembed', oembed)
-
-app.use(router)
-
-const PORT = 8081
-// start the app
-app.listen(PORT, (error) => {
- if (error) {
- return console.log('something bad happened', error)
- }
- log('listening on ' + PORT + '...')
-})
diff --git a/bridge/webpack.config.js b/bridge/webpack.config.js
deleted file mode 100644
index 9467224d..00000000
--- a/bridge/webpack.config.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const ESLintPlugin = require('eslint-webpack-plugin')
-const TerserPlugin = require('terser-webpack-plugin')
-
-module.exports = () => {
- const node_env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'
- const dev = node_env !== 'production'
- const config = {
- mode: node_env,
- devtool: dev ? 'cheap-module-source-map' : false,
- entry: {
- 'bridge': [
- __dirname + '/index.js'
- ]
- },
- target: 'node',
- output: {
- path: __dirname + '/../public',
- filename: '[name].js'
- },
- module: {
- rules: [{
- test: /\.js$/,
- exclude: [
- /node_modules/
- ],
- loader: 'babel-loader'
- }, {
- test: /\.(png|jpe?g|gif|svg)$/i,
- type: 'asset/resource'
- }]
- },
- plugins: [
- ],
- resolve: {
- symlinks: false,
- extensions: ['.js']
- }
- }
- if (dev) {
- config.plugins.push(
- new ESLintPlugin({
- files: __dirname + '/src',
- lintDirtyModulesOnly: true,
- failOnWarning: false,
- failOnError: true,
- fix: false
- }))
- config.devServer = {
- hot: true,
- historyApiFallback: true,
- client: {
- overlay: {
- runtimeErrors: true
- }
- }
- }
- }
- config.optimization = {
- minimize: !dev,
- minimizer: [
- new TerserPlugin({
- minify: TerserPlugin.swcMinify,
- // `terserOptions` options will be passed to `swc` (`@swc/core`)
- // Link to options - https://swc.rs/docs/config-js-minify
- terserOptions: {},
- }),
- ]
- }
- return config
-}