Size: a a a

2020 January 27

F

Foma in JS Liberty
Foma
scripts:{
  "start":"node index"
}

in root index.js

const express = require('express');
const path = require('path');

const app = express();

app.use(express.static(__dirname + '/dist/<name-of-app>'));

app.all('/*', function(req,res) {
   
res.sendFile(path.join(__dirname+'/dist/<name-of-app>/index.html'));
});

app.listen(process.env.PORT || 8080);
create index.js in root, install express, and run script start
источник

H

Hermann in JS Liberty
Foma
create index.js in root, install express, and run script start
i have this

const express = require('express');
const app = express();
const path = require('path');


// Serve static files....
app.use(express.static(__dirname + '/dist/'));

// default Heroku PORT
app.listen(process.env.PORT || 8080);

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

console.log("console listening");
источник

F

Foma in JS Liberty
Hermann
i dont add index.js
angular is not server
источник

F

Foma in JS Liberty
Hermann
i have this

const express = require('express');
const app = express();
const path = require('path');


// Serve static files....
app.use(express.static(__dirname + '/dist/'));

// default Heroku PORT
app.listen(process.env.PORT || 8080);

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

console.log("console listening");
good
источник

F

Foma in JS Liberty
run node js and screen localhost8080 in browser
источник

DE

Denis Efremov in JS Liberty
js
const express = require('express');
const app = express();
const path = require('path');


// Serve static files....
app.use(express.static(__dirname + '/dist/'));

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

// default Heroku PORT
app.listen(process.env.PORT || 8080);

console.log("console listening");
источник

S

Syntax Highlight Bot in JS Liberty
Denis Efremov
js
const express = require('express');
const app = express();
const path = require('path');


// Serve static files....
app.use(express.static(__dirname + '/dist/'));

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

// default Heroku PORT
app.listen(process.env.PORT || 8080);

console.log("console listening");
источник

F

Foma in JS Liberty
Hermann
i have this

const express = require('express');
const app = express();
const path = require('path');


// Serve static files....
app.use(express.static(__dirname + '/dist/'));

// default Heroku PORT
app.listen(process.env.PORT || 8080);

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

console.log("console listening");
wtf app.get("/*
источник

H

Hermann in JS Liberty
Foma
run node js and screen localhost8080 in browser
i need host my app.
источник

F

Foma in JS Liberty
run nodejs?
источник

H

Hermann in JS Liberty
Foma
run nodejs?
not work...
источник

F

Foma in JS Liberty
?
источник

DE

Denis Efremov in JS Liberty
Notwork manager*
источник

F

Foma in JS Liberty
Hermann
i have this

const express = require('express');
const app = express();
const path = require('path');


// Serve static files....
app.use(express.static(__dirname + '/dist/'));

// default Heroku PORT
app.listen(process.env.PORT || 8080);

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

console.log("console listening");
name of this file? and dist/???
источник

H

Hermann in JS Liberty
node server.js
источник

H

Hermann in JS Liberty
Error: ENOENT: no such file or directory, stat 'C:\Users\....\Algorithm-projectOne\dist\index.html'
источник

F

Foma in JS Liberty
Hermann
node server.js
screen package.json
источник

F

Foma in JS Liberty
Hermann
Error: ENOENT: no such file or directory, stat 'C:\Users\....\Algorithm-projectOne\dist\index.html'
name of your project!!!
источник

H

Hermann in JS Liberty
Foma
name of your project!!!
Algorithm-projectOne
источник

H

Hermann in JS Liberty
Foma
screen package.json
источник