Skip to content

Instantly share code, notes, and snippets.

View trapcodeio's full-sized avatar
🏠
Working from home

Anthony (Trapcode) trapcodeio

🏠
Working from home
View GitHub Profile
@trapcodeio
trapcodeio / xpresser.default-config.ts
Created December 13, 2020 23:20
XpresserJs Config File
const DefaultTimestamp = "YYYY-MM-DD H:mm:ss";
/**
* Server Related configurations.
*/
const ServerConfig = {
/**
* Middleware to handle server under maintenance mood
*
@trapcodeio
trapcodeio / vue.config.js
Last active December 28, 2020 20:04
Vue use custom tsconfig.json
module.exports = {
chainWebpack: config => {
config
.plugin('fork-ts-checker')
.tap(args => {
args[0].tsconfig = './path/to/tsconfig.json';
return args;
});
}
};
server {
listen 80;
server_name example.com;
charset utf-8;
root {{app_root}}/dist;
index index.html index.htm;
# Always serve index.html for any request
location / {
root {{app_root}}/dist;
try_files $uri /index.html;
server {
listen 80;
server_name example.com;
charset utf-8;
root {{app_root}}/dist;
index index.html index.htm;
# Always serve index.html for any request
location / {
root {{app_root}}/dist;
try_files $uri /index.html;
@trapcodeio
trapcodeio / isSameObjectByJson.ts
Last active April 26, 2024 04:43
Compare Javascript obj using json
/**
* Compare two objects.
* @param source
* @param compare
*/
export function isSameObjectByJson(source: Record<any, any>, compare: Record<any, any>) {
let s: string, c: string;
try {
s = JSON.stringify(source, null, 0);
@trapcodeio
trapcodeio / xpresser-spin-rfc.ts
Last active November 19, 2021 14:13
Spin Xpresser
/**
* --- STAGE: RFC ---
* Xpresser Spin is a one file xpresser setup command.
* This will become the fastest way to spin up an expressjs fully backed MVC server in nodejs.
* @example
* xjs spin app.ts // will read the file and start xpresser.
*/
// For types sake
type DollarSign = any;
@trapcodeio
trapcodeio / vue-caddy
Created February 13, 2023 13:02
Caddy Vue Config
domain {
root * /var/patch/dcc-front-vite/dist
file_server
try_files {path} /index.html
tls /etc/caddy/certs/tdm.pem /etc/caddy/certs/tdm.key
}