This API is created for backend of OneWord Blog App. OneWord blog app is blog that inspired from one of the blog site from Google called Blogger. This API are created with Express as Nodejs framework and MySQL as store database. More about Express
- Open app's directory in CMD or Terminal
- Type
npm install
- Make new file a called .env, set up first here
- Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
- Create a database with the name #nama_database, and Import file sql to phpmyadmin
- Open Postman desktop application or Chrome web app extension that has installed before
- Choose HTTP Method and enter request url.(ex. localhost:3000/)
- You can see all the end point here
- Type
npm run dev
to activated the server.
Open .env file on your favorite code editor, and copy paste this code below :
DB_PORT= <YOUR SERVER PORT>
DB_HOST= <YOUR DATABASE HOST>
DB_USER= <YOUR DATABASE USERNAME>
DB_PASS= <YOUR DATABASE PASSWORD>
DB_DATABASES= <YOUR DATABASE NAME>
SMTP_EMAIL = <YOUR EMAIL>
SMTP_PASSWORD = <YOUR PASSWORD>
- Login and Register User
- Update User's Profile
- Get All User and Posts
- Create, Update, and Delete Post
- Create Comment for Post