An application created with Angular where users can write and see posts.
- HTML5
- SCSS
- Angular
- Typescript
- Node.js
- MongoDB
- Simple and clean UI design.
- Realtime update of posts.
updatePost(postId: string, postTitle: string, postContent: string) {
const postData: IPost = {
id: postId,
title: postTitle,
content: postContent
};
this.http
.put(`${this.servicesUrl}api/posts/${postId}`, postData)
.subscribe(res => {
const oldIndex = this.posts.findIndex(post => post.id === postId);
this.posts[oldIndex] = postData;
// console.log("After updating posts", this.posts);
this.changeInPost(true);
});
}
Updates the existing post by retrieving the postID from Mongo.
- An active internet connection.
- Node & Npm.
- Modern Browser such as Edge, Chrome, Safari, Firefox.
- Visual Studio Code.
- Download or clone the repository.
- cd into the directory.
- Install the required dependencies using
npm-install
- To start the server locally use
npm run start:server
( make sure this is always running in a terminal or cmd) - To start the project use
npm run start
.
© Shubham Kumar Singh | 2019