Skip to content

webethics/code-snippet-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The node.js snippets

This node.js snippet has included the auth, post, and comments crud operations.

User

  • User Sign-Up With Email Verificaiton
  • User Login

Post

  • Create Post
  • Edit Post
  • Delete Post
  • Post Listing With Comments

Comments

  • Add Comment To Post
  • Edit Post Comment
  • Delete Post Comment

Requirements

  • Node 14
  • Git
  • Typescript

Common setup

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •