Together - is a web-application that allows a user to create a social event and post it publicly to all users or within a specified group of users. Any user can join/share/comment on the event. Any event can be geographically filtered/located.
-
Check if you have installed Node.js. Run in terminal
node -vIf node is not installed, download and install it from here: https://nodejs.org/en/ -
Check if you have installed
git. Run in terminalgitIf git is not installed, download and install it from here: https://git-scm.com/downloads -
Check if you are added as a collaborator to 'bogutski/together' repository(repo).
- Clone the repo on your local machine. There are 2 ways to clone the repo:
*through terminal. Run in terminal:
git clone git@github.com:bogutski/together.git.
*through Webstorm. When opening Webstorm, choose Check out from Version Control
and enter URL: https://github.com/bogutski/together.git.
-
Open a project in Webstorm.
-
Open terminal in Webstorm and run
npm iornpm install.
If you have not installed nodemon, install it by using the following terminal command: npm install -g nodemon.
Nodemon allows to start a server once and it will restart automatically on the code change.
To start the server, you can run one of the scripts in terminal:
*npm start(the server will start running but no changes will be applied to the running instance of the application.
You will have to stop and restart the server manually to reflect the changes. This script will running in production.)
*npm run dev (the server will start running and will restart automatically if any changes are made to the sourcecode ).
For more info, watch: https://youtu.be/q8YzwAbrVSY
If you don't have permission to install nodemon, run npm start.
https://coop-server.herokuapp.com/
- https://youtu.be/q8YzwAbrVSY 'Instruction on how to install server'.
- https://youtu.be/1Bxp50ri8o8 'Hiroku adjustment'.
- https://youtu.be/0Jce4nPulGs 'Module message'.
- https://youtu.be/AWRHpVvq_uU 'Overall server structure using the example of PASV'.
- https://youtu.be/wJKULr9ZEz8 'Database connection to the app. MongoDB Atlas'
Web framework for node.js.
Path: /modules/core/logger.js.
This module allows to see in console logs like POST /info 200 3.405 ms - 23.
-
Add a rating of events, communities of interests. Show the most popular topics of meetings according to their area.
-
Let the person who creates an event make it public or private for a specific group of people.
-
Testing 'Register':
- Examples of positive automated test scripts to test 'Register'(make sure you have valid input in 'Body' on the request panel located on top of the request field):
/*1.To check if we get the response, run the following test script that confirms it is a 'success': */ pm.test("Response is success", function () { let jsonData = pm.response.json(); pm.expect(jsonData.success).to.equal(true) }); /*2.To check if we get a correct returning message when a user has been registered, run the following script: pm.test("Correct response message", function () { let jsonData = pm.response.json(); pm.expect(jsonData.message).to.equal("User was created successfully. Please check and verify your email") }); /* Expected result - 'pass', expected response message - "User was created successfully. Please check and verify your email".*/- Examples of negative automated test scripts to test 'Register'. Enter invalid email (e.g. "itrusevich").
/* 1. To check if we get the response, run the following test script that checks that our response message is NOT 'success'(ecpected result - 'fail': */ pm.test("Response is success", function () { let jsonData = pm.response.json(); pm.expect(jsonData.success).to.equal(true) }); /* 2.To check if we get a correct returning error handling message when a user has NOT been registered, run the following script: */ pm.test("Correct Error message", function () { let jsonData = pm.response.json(); pm.expect(jsonData.message).to.equal("User was not created") }); // Expected result - 'pass', expected response message - "User was not created". -
Testing 'Get By Id': (to be added when functionality is deployed)