Is an application for managing (add or edit) employees and departments in the Bangazon Corporation.
Visual Studio Code is Microsoft's cross-platform editor that we'll be using during orientation for writing JavaScript and building Node applications. Make sure you add the JavaScript extension immediately after installation completes.
In your config.json file add your current user and the password you use to access that user with psql.
Not doing this causes the following error.
Loaded configuration file "config/config.json". Using environment "development". sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules/sequelize/lib/sequelize.js:236:13
https://nodejs.org/en/docs/guides/getting-started-guide/
- Click the above link to download Node.
https://nodejs.org/en/download/ - Make a directory for your app: mkdir HelloWorld
- Move to the newly created directory: cd HelloWorld
- Create a new file called app.js:
- Paste in the code form the example link at the top of the instructions.
- Run the app: node app.js
- Navigate to http://localhost:8000/api/v1
- You should see your 'Hello World' message.
It is recommended that you install node via your package manager. The rest of the project is exactly the same as Windows and macOS.
sudo apt install nodejs
sudo dnf install nodejs
For all types of machines use the following command to install Sequelize CLI
For all types of machines use the following command to install Postgres
ERROR: password authentication failed for user "postgres"
Example :
"development": {
"username": "postgres",
"password": "pass",
"database": "bangazon_workforce",
"host": "127.0.0.1",
"dialect": "postgres"
}
If it still fails, make sure the following command works.
psql -h localhost -U postgres
Be sure whenever changing branches or before pulling branches to Drop Tables
THIS DROPS ALL TABLES
sequelize db:migrate:undo:all
Use the following command to migrate all tables after dropping said tables.
sequelize db:migrate
Use the following command to seed data into tables. Do this command after the tables have been migrated
sequelize db:migrate:seed:all
When editing employees be sure to include a start date. This will effect the application if not included. A fix is currently being worked on.