This node.js snippet has included the auth, post, and comments crud operations.
- User Sign-Up With Email Verificaiton
- User Login
- Create Post
- Edit Post
- Delete Post
- Post Listing With Comments
- Add Comment To Post
- Edit Post Comment
- Delete Post Comment
- Node 14
- Git
- Typescript
Clone the repo and install the dependencies.
git clone https://github.com/webethics/code-snippet-node.git
cd code-snippet-node
npm install
To start the express server, run the following
npm run start
Open http://localhost:5000 and take a look around.
Open environments/dev.env.ts
and inject your credentials so it looks like this
db_url=<db_url>
jwt_secret=<jwt_secret>
mail_driver=<mail_driver>
mail_host=<mail_host>
mail_port=<mail_port>
mail_username=<mail_username>
mail_password=<mail_password>
mail_from_email=<mail_from_email>
mail_from_name=<mail_from_name>
Step 7: To start the express server, run the following
npm run start:dev
Final Step:
Open http://localhost:5000 and take a look around.