Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.env
.vscode
data
ecosystem.config.cjs
node_modules
package-lock.json
yarn.lock
Expand Down
1 change: 0 additions & 1 deletion app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "dotenv/config";
import path from "path";

import express from "express";
Comment thread
marcoscaceres marked this conversation as resolved.
Expand Down
14 changes: 14 additions & 0 deletions ecosystem.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// @ts-check
"use strict";

/** @type {import("pm2").StartOptions} */
const app = {
name: "respec-web-services",
script: "./build/app.js",
node_args: "--env-file-if-exists=.env --enable-source-maps",
env_production: {
NODE_ENV: "production",
},
};

module.exports = { apps: [app] };
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"chalk": "^5.6.2",
"compression": "^1.8.1",
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"express-rate-limit": "^8.4.1",
"helmet": "^8.1.0",
Expand All @@ -28,11 +27,11 @@
"build": "tsc",
"build:watch": "tsc -w",
"prestart": "npm run update-data-sources && npm run regenerate-docs",
"start": "node --enable-source-maps build/app.js",
"start": "node --env-file-if-exists=.env --enable-source-maps build/app.js",
"start:server": "pm2 start ecosystem.config.cjs --env production",
"test": "jasmine --config=tests/jasmine.json",
"regenerate-docs": "node --trace-warnings ./build/scripts/regenerate-docs.js",
"update-data-sources": "node build/scripts/update-data-sources.js"
"update-data-sources": "node --env-file-if-exists=.env build/scripts/update-data-sources.js"
},
"packageManager": "pnpm@9.8.0",
"pnpm": {
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion scripts/update-data-sources.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "dotenv/config";
import { mkdir } from "fs/promises";
import { env } from "../utils/misc.js";
import caniuse from "../routes/caniuse/lib/scraper.js";
Expand Down
8 changes: 4 additions & 4 deletions scripts/update-w3c-groups-list.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Run this script occasionally to update {@link {DATA_DIR}/w3c/groups.json}
* with new group shortnames and IDs.
* Updates {@link {DATA_DIR}/w3c/groups.json} with current group shortnames and IDs.
*
* Standalone: node --env-file-if-exists=.env build/scripts/update-w3c-groups-list.js
* Via npm: npm run update-data-sources
*/

import path from "path";
import { writeFile, mkdir } from "fs/promises";

import "dotenv/config";

import { env } from "../utils/misc.js";

const DATA_DIR = env("DATA_DIR");
Comment thread
marcoscaceres marked this conversation as resolved.
Expand Down
Loading