V
V
Valery Orlov2019-01-17 22:03:38
Node.js
Valery Orlov, 2019-01-17 22:03:38

How to run a frontend shell from a ready github project?

Good day. On github, I came across a project that interests me: https://github.com/alan2207/MERN-starter
From the description it is clear that it is necessary to correct the server and client configuration files and install their dependencies: npm install
The server configuration looks like this:

module.exports = {
    db: "mongodb+srv://mobile:[email protected]/mobile",
    port: 3000,
    secret: "SuppER_seCreT"
}

I went into the server folder and ran it through npm start, checked it. Data in b.d. are saved.
Client side config: Also in the client folder, left only one folder which I renamed to src. But no matter how I try to run the frontend shell: nothing comes out for me. What am I doing wrong?
export const ROOT_URL = "http://localhost:3000";
src-bootstrap
http://localhost:3000

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Zharov, 2019-01-18
@lungdesire29

the server from this starter kit does not host statics, you need a separate server to distribute the front (webpack-dev-server, nginx in the prod). This starterkit is webpack-dev-server friendly, run "npm start" in front folder. Another point, your server is listening on port 3000 (according to the settings), webpack-dev-server will listen on 3001

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question