This application is for a food delivery service (FDS). Our application uses React.js, Node.js, Express.js and PostgreSQL.
- Ensure that you have the latest version of NodeJS from https://nodejs.org/en/
- Ensure that you have the latest version of PostgreSQL from https://www.postgresql.org/
- You should also install psql, an interactive terminal for PostgreSQL
- Download the source code.
- Launch psql and initialize a new PostgreSQL database called ‘cs2102’ with the following configuration:
- Ensure that your username is ‘postgres’
- Ensure that your password is blank. This can be set using the guide from https://dba.stackexchange.com/a/14741/206509
- Set the PGPASSWORD environment variable. For details see the manual: http://www.postgresql.org/docs/current/static/libpq-envars.html
- Use a .pgpass file to store the password. For details see the manual: http://www.postgresql.org/docs/current/static/libpq-pgpass.html
- Use "trust authentication" for that specific user: http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-TRUST
- Use a connection URI that contains everything: http://www.postgresql.org/docs/current/static/libpq-connect.html#AEN42532
- Ensure that the port number is 5432. This can be changed in the postgresql.conf file located in the PostgreSQL’s data directory (e.g. PostgreSQL/12/data)
- Import the init.sql file into the database located in the server/api directory. This can be done by the command ‘\i [file path of init.sql]’
- Open a Terminal and execute the command ‘npm install’ in the client folder directory. This will install all the required dependencies in the local node_modules directory for the client to run.
- Change directory to the server folder directory and execute the command ‘npm install’. This will install all the required dependencies in the local node_modules directory for the server to run.
- At the source code’s root directory, execute ‘npm install’.
- At the source code’s root directory, execute ‘npm run dev’ to launch the application. This will run both the server and React.js application.
- Reactstrap - Easy to use React Bootstrap 4 components
- react-calendar - Ultimate calendar for your React app
- SweetAlert - SweetAlert makes popup messages easy and pretty
- axios - Promise based HTTP client for the browser and node.js
- react-icons - Include popular icons in React projects, which utilizes ES6 imports that allows you to include only the icons that the project is using.