A build-to-learn medium fullstack clone project, built during the 4th chingu voyage by bears-team-5.
due to an unfortunate series of events, only the backend has been developed successfully, you can try it out at https://medium-clone-api.herokuapp.com using any API testing tool such as Postman
read the charcter document to know more about the MVP, standards, and the proccess followed during the project
the REST API documentation can be found here
These instructions will get you a copy of the REST API running on your local machine for development and testing purposes.
run the following npm command in the project's folder in order to download and install all dependencies
git clone https://github.com/chingu-voyage4/Bears-Team-5.git
npm install
- download and install MAMP or any other similar software to start a local mySQL server with InnoDB engine.
- create a new database with any name.
- run the SQL query provided in:
/model/schema.sql
file to populate the database with the required tables. if you're using MAMP, this can be simply done by:- open phpmyadmin which be default is at http://localhost/phpMyAdmin/
- clicking
new
from the left menu to create a new database, name ittest
. - then click the newly created database name under the same list to access it.
- now click the
SQL
button from the top menu and simply copy and paste all the contents of theschema.sql
file to the query input, make sure to disable foreign key checks and then clickgo
. - now your database is ready to be used.
create a new file and name it .env
, this file will hold all the environment variables required to properly connect the app to the local mySQL database we just created. the variables that must be provided can be found in the .env.default
file.
example of a working .env
file:
NODE_ENV=development
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=root
DB_NAME=test
JWT_SECRET=foobarbaz
now run the following command to start the API
node server.js
the API is now running! you communicate with it using tools like postman
you can also run tests using:
npm run test
if everything is setup properly, all tests should pass without any issues.
MIT, see the LICENSE.md file for details.