Skip to content

schikimikiviki/Employee-fullstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Employee Data

Server side

Install dependencies

cd ./server
npm install

.env file

Copy the .env.sample as .env and fill up the environment variable for your personal mongodb connecttion url.

Prepare the database

cd ./server
npm run populate

populate command will run the populate.js file as a script and it will generate a buch of starter data for your database.

Running the code

cd ./server
npm run dev

It will start the server with nodemon. So it will watch the changes and restart the server if some ot the files changed.

Testing with test.http

If you like to try the endpoints of the rest api, you can check the test.http file for urls are should work on your environment as well. And if you install the REST Client extenstion for vscode you can actually run those in your editor.

Client side

Install dependencies

cd ./client
npm install

Proxy

Watch for the port of your rest api. By default it will bind on port 8080 and the frontend proxy settings also depend on this configuration. If you for some reasons change the port of the backend, don't forget to change the ./client/package.json proxy settings as well.

Runnig the code

cd ./client
npm start

And the create-react-app react-scripts package will start your frontend on the 3000 port and you can visit the http://localhost:3000 on your preferred browser.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published