expressjs

expressjs

Express.js: the fast, unopinionated, minimalist web framework for node

Member Since 8 years ago

Experience Points
0
follower
Lessons Completed
0
follow
Best Reply Awards
41
repos
Activity
May
19
22 hours ago
started
started time in 36 minutes ago
Activity icon
issue

SulaimanAminuBarkindo issue comment expressjs/express

SulaimanAminuBarkindo
SulaimanAminuBarkindo

Is there any subtle difference between use(*) use(/)

// 1
app.use(fn)

// 2
app.use(`/`, fn)

// 3
app.use(`*`, fn)

// 4
app.use([], fn)
SulaimanAminuBarkindo
SulaimanAminuBarkindo

there is no difference because both will prevent the request to go beyond them.

started
started time in 2 hours ago
started
started time in 3 hours ago
started
started time in 4 hours ago
started
started time in 5 hours ago
started
started time in 5 hours ago
started
started time in 5 hours ago
Activity icon
issue

jfarnsworth95 issue expressjs/compression

jfarnsworth95
jfarnsworth95

Angular Not Compressing?

I'm certain I'm doing something wrong, but I'm not getting errors and the main-es2015 file (along with all the other files) are not marked as compressed in the chrome dev console. The app still works fine otherwise.

In the server file that creates the express app obj:

const express = require('express');
const path = require('path');
const app = express();
require('dotenv').config();

console.log(process.env.FRONTEND_SERVER_PORT);
app.use(compression())

app.use(express.static(path.join(__dirname, 'dist')));

app.get('/*', function(req, res) {
    res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});

app.listen(process.env.FRONTEND_SERVER_PORT);

Package.json:

    ...
    },
    "private": true,
    "dependencies": {
		...
        "compression": "1.7.4",
        ...
    },
	...
}

Any idea what I've implemented incorrectly here, or what other info is needed to debug this? The lack of any error is really throwing me off.

Activity icon
issue

jfarnsworth95 issue comment expressjs/compression

jfarnsworth95
jfarnsworth95

Angular Not Compressing?

I'm certain I'm doing something wrong, but I'm not getting errors and the main-es2015 file (along with all the other files) are not marked as compressed in the chrome dev console. The app still works fine otherwise.

In the server file that creates the express app obj:

const express = require('express');
const path = require('path');
const app = express();
require('dotenv').config();

console.log(process.env.FRONTEND_SERVER_PORT);
app.use(compression())

app.use(express.static(path.join(__dirname, 'dist')));

app.get('/*', function(req, res) {
    res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});

app.listen(process.env.FRONTEND_SERVER_PORT);

Package.json:

    ...
    },
    "private": true,
    "dependencies": {
		...
        "compression": "1.7.4",
        ...
    },
	...
}

Any idea what I've implemented incorrectly here, or what other info is needed to debug this? The lack of any error is really throwing me off.

jfarnsworth95
jfarnsworth95

Given the nature of the app I'm working with, I don't think I can provide more than I've already shown. I understand this means there's nothing to be done, so I'm sorry for taking up your time.

Activity icon
fork

farrelkoh13 forked expressjs/morgan

⚡ HTTP request logger middleware for node.js
farrelkoh13 MIT License Updated
fork time in 8 hours ago
started
started time in 8 hours ago
Activity icon
fork

mustafaersoyer forked expressjs/express

⚡ Fast, unopinionated, minimalist web framework for node.
mustafaersoyer MIT License Updated
fork time in 8 hours ago
started
started time in 8 hours ago
Activity icon
issue

wll8 issue expressjs/express

wll8
wll8

Is there any subtle difference between use(*) use(/)

app.use(() => {})

app.use(`/`, () => {})

app.use(`*`, () => {})
started
started time in 10 hours ago
started
started time in 10 hours ago
started
started time in 11 hours ago
Activity icon
fork

KarenCorp forked expressjs/express

⚡ Fast, unopinionated, minimalist web framework for node.
KarenCorp MIT License Updated
fork time in 11 hours ago
started
started time in 12 hours ago
started
started time in 13 hours ago
started
started time in 13 hours ago
started
started time in 14 hours ago
started
started time in 14 hours ago
Activity icon
fork

wm-vect forked expressjs/express

⚡ Fast, unopinionated, minimalist web framework for node.
wm-vect MIT License Updated
fork time in 14 hours ago
started
started time in 15 hours ago
started
started time in 15 hours ago
Activity icon
fork

Techi-Dev forked expressjs/express

⚡ Fast, unopinionated, minimalist web framework for node.
Techi-Dev MIT License Updated
fork time in 15 hours ago
Activity icon
fork

Lxxyx forked expressjs/express

⚡ Fast, unopinionated, minimalist web framework for node.
Lxxyx MIT License Updated
fork time in 16 hours ago
Previous