Can't start using backend and frontend seems to be the demo

Gravatar

Hello, first of all, I've purchased the "SING APP REACT NODE.JS" (React Admin Dashboard Template with Node.JS Backend)

1) I installed and started the backend following the "user-management-template-backend" Readme. I started the development build with the command: yarn start:dev

And what's next? The console says Listening on port 8080.

Ok, I go to localhost:8080 and I get a blank page with: Cannot GET / So, what's is the url? How can I start managing the backend? There is no documentation at all.

2) Also I've started the frontend (Sing-app-react), and it's like the demo, a static site. It seems like I haven't purchased the NodeJS backend version, but I did. Doesn't it connect with the postgresql database?

Also, the link that referers to "nodejs backend documentation" just not works: https://github.com/flatlogic/nodejs-backend

So,

1) How can I start using the backend after doing 'yarn start:dev'? 2) How is connected the frontend with the backend? (The zip downloaded is "sing-app-react-v8.2.3") Is this the Fully Stack version? Why works like the demo? It's 100% static.

Thanks.

Gravatar
Eugene Stepnov

Hi Daniel,

You are starting the wrong back end yes. Could you please send us your GitHub username and we will send you an invite to the proper one?

Best, Eugene

Gravatar

Thanks for the response Eugene.

My GitHub username is: danielmayans

Thank you.

Gravatar

Hi Daniel,

Adjust local db:

1) Install postgres: MacOS:

brew install postgres

Ubuntu:

sudo apt update

sudo apt install postgresql postgresql-contrib

2) Create db and admin user:

Before run and test connection, make sure you have created a database as described in the above configuration. You can use the psql command to create a user and database.

psql -U postgres

Type this command to creating a new database.

postgres=> CREATE DATABASE development OWNER postgres;

postgres=> \q


Setup database tables: yarn reset

Start development build: yarn start:dev

Start production build: yarn start

Gravatar

Ok, but I needed the correct command for the frontend. The only way I have gotten the frontend to work properly is with the command "yarn start: backend". So now my frontend connects with the backend, and all just runs fine.

Other thing I've noticed is every time the server restarts, it resets the database, so all the new users / products added or modified are gone. Maybe I'm doing something wrong? How can I solve this?

Thanks for help!

Gravatar

Please open src/index.js file of the backend code, on line 44 you'll see cron job with yarn reset command. Remove it and this will stop database update

Gravatar

Thank you sir!

Cookie Consent

By continuing to browse or by clicking 'OK', you agree to the storing of cookies on your device to enhance your site experience and for analytical purposes. To learn more about how we use cookies, please see our cookies policy.