Here you will find project 13 of the “JavaScript/React application developer” training. The objective of this project is to use Redux to manage the global state of the application. A token authentication system is also linked with API requests to make the application dynamic.
Argent Bank uses the following tech stack:
Please make sure you have the right versions and download both packages. You can verify this by using the following commands in your terminal:
# Check Node.js version
node --version
# Check Mongo version
mongo --version
- Fork this repo
- Clone the repo onto your computer
- Open a terminal window in the cloned project
- Run the following commands:
- Start server:
# Install dependencies
npm install
# Start local dev server
npm run dev:server
# Populate database with two users
npm run populate-db
Your server should now be running at http://locahost:3001 and you will now have two users in your MongoDB database!
- Start client
cd client
# Install dependencies
npm install
# Start local dev server
npm run dev
Once you run the populate-db
script, you should have two users in your database:
- First Name:
Tony
- Last Name:
Stark
- Email:
tony@stark.com
- Password:
password123
- First Name:
Steve
, - Last Name:
Rogers
, - Email:
steve@rogers.com
, - Password:
password456
To learn more about how the API works, once you have started your local environment, you can visit: http://localhost:3001/api-docs
Note
A suggested transaction API is available in the swagger2.yml file.
Important
The information in this part is for information purposes only, the configuration is already applied.
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
- Optionally add
plugin:@typescript-eslint/stylistic-type-checked
- Install eslint-plugin-react and add
plugin:react/recommended
&plugin:react/jsx-runtime
to theextends
list