- Node v12.x (use this version to prevent
node-sass
errors) - Deno v1.x+
- Install npm dependencies.
$ npm install
- Run webpack.
$ npm run webpack:development
- Run the server.
$ npm run server
In the event you want to build an environment (e.g., staging, production, QA), you will need to take the following steps:
-
Set up a web server to handle serving the website application. The website application runs on
localhost:1445
.- For Apache: https://github.com/drashland/website/blob/main/apache.conf
- For Nginx: In progress
-
Install PM2.
-
Install dependencies:
npm i
-
Make a copy of
ecosystem.config.sample.js
toecosystem.config.js
. -
Build bundles:
npm run webpack:development # or :production
-
Run (or restart if PM2 is already running) PM2. PM2 will use your
ecosystem.config.js
file to start the website application and keep your application online 24/7.
$ pm2 start
[PM2] Spawning PM2 daemon with pm2_home=/home/someone/.pm2
[PM2] PM2 Successfully daemonized
[PM2][WARN] Applications Drash Land (localhost:1445) not running, starting...
[PM2] App [Drash Land (localhost:1445)] launched (1 instances)
┌─────┬────────────────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼────────────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ Drash Land (localhost:1445) │ default │ N/A │ fork │ 228260 │ 0s │ 0 │ online │ 0% │ 24.8mb │ someone │ enabled │
└─────┴────────────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
-
npm run compile:vue-routes
Compiles all Vue routes for all modules.
-
npm run server
Starts the server.
-
npm run webpack:development
Runs webpack in development mode.
-
npm run webpack:production
Runs webpack in production mode.