![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
expressively
Advanced tools
Express with some directory structure associated.
You can use this with socket.io. Since the docs in socket.io show a more complicated method, below is a full example with browserify.
You will need to npm install expressively
, socket.io
, and socket.io-client
.
var expressively = require('expressively'),
socketio = require('socket.io');
expressively
.start({
...
})
.then(function(result){
var io = socketio(result.server);
io.on('connection', function (socket) {
console.log('socket connected');
console.log('you will only see this if someone is looking at the front end');
socket.emit('news', { hello: 'world' });
socket.on('my other event', function (data) {
console.log(data);
});
});})
Now on the front end (assuming you are using browserify):
var io = require('socket.io-client'),
socket = io.connect('http://my.domain.com');
socket.on('news', function (data) {
console.log(data);
socket.emit('my other event', {my : 'data'});
});
If you are using nginx and you have issues, make sure your reverse proxy looks something like this:
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_pass http://my_app/;
proxy_redirect off;
}
Not have Upgrade and version 1.1 will cause problems.
Starting in v1.0.0
there is less magic in expressively, and configs are not built for you.
To import your own configs in from anywhere in your app just use require.main.require('./configs')
. The
previous would work if you had a configs
dir at the level of your main file.
Important configs:
{
"port" : "// The port number the express app should listen on"
}
Optional configs:
{
"protocol" : "http|https //Only really needed for HTTPS, HTTP is run by default",
"https" : {
"key" : "//relative path to private key from baseDirectory",
"cert" : "//relateive path to certificate from baseDirectory"
}
}
routes.json
will look for available middlewares here.
You can put your "pages" as directories here with each page directory containing and index.js
and a view.pug
.
You can refer to just the directory name in routes.json, and you can do res.cache(require.resolve('./view.pug'), date)
to render your page and cache it.
Jade templates can be stored here for conveniance
2.0.0
- Adding more flexibility via configuration and removing some uneeded functionality. Docs incomplete.1.1.3
- Dependency fix to fully support pug.FAQs
Express with some directory structure associated.
The npm package expressively receives a total of 3 weekly downloads. As such, expressively popularity was classified as not popular.
We found that expressively demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.