WordBox is a truly modern WordPress development (and deployment) environment.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
630 B

6 years ago
'use strict';
6 years ago
const fs = require('fs');
const { EOL } = require('os');
7 years ago
6 years ago
const express = require('express');
const chalk = require('chalk');
7 years ago
6 years ago
const php = require('./php');
const config = require('./config');
const plugins = require('./plugins/loader');
7 years ago
6 years ago
const app = express();
7 years ago
6 years ago
plugins(app); // Load any plugins declared in config
7 years ago
app.use("/", php.cgi(config));
6 years ago
const fancy = fs.readFileSync('./fancy.txt');
7 years ago
const listeningMsg = (
chalk.yellow(fancy) + EOL +
chalk.green(` Server listening on port ${config.port}` + EOL +
'+---------------------------------+')
6 years ago
);
7 years ago
6 years ago
app.listen(config.port, () => console.log(listeningMsg));