step by step guide to create angular and node js application

Short Discription:

Here we guide to create a angular 18 with karma test configuration and node js application


Git Repo:

1. First all clone your git repo using the following command

    git clone < repo url > 

2. After clone successfully go to the github repo and check the main branched is available or not if not available create main branch and make as a default and then create a one sub-branch under the main 

3. After come to the your project cloned terminal and run the following command 

   git fetch

Above command will fetch your latest create sub-branch and using following command to checkout your sub-branch

   Git checkout 

4. above steps are follow carefully


Creating angular project frontend:

1. Run following command on your porject clone directory to create the angular project 

to create specific angular 18th version app, run:

    npx @angular/cli@18 new <app name>  --standalone=false

    or 
    creating latest angular project , run: 

    ng new <app name>

2. After successfully created a app modifie the .gitignore file i add detail screenshot below


3. after create karma.conf.js file in the root directory below i add a screen shot for better understand , this is a test case configuration file 


4. after created a karma.conf.js file write a following code inside the file
    and install this floowing dependansis 
 


and look on the below snapshat for the karma.conf.js file for your referance also stady any other resource for more info this karma configuration 




Above code for the karma configuration code if you not understand ask arun to get this file code

5. then update the angular.json file path is

    architect > test > options.  "karmaConfig": "karma.conf.js",

    add this key value pair under the options

I add screenshot for more understand 



After the test case conguration done , run test case following command

ng test

Creating Backend Node Js Server:

1. create a backend folder in root directory 

2. open the terminal in the backend folder and run the following command

      npm init –y

To create node app

3. and after initialize the node app create a app.js file

4. and then install the needed node module while run the following command

    npm install express cors cookie-parser path morgan

5. after install the node modules create the app.js file under the backend folder and update code 





and run the npm start command run your backend server successfully incase if you get any error just give and the error in chatgpt


Conclusion

Here we covered the folllowing topics


1. Create angular 18 app with karma confi
2. Create node server
3. Github ci configuration


Follow all the steps carefully and happy to work on angular node app 


"This Content Sponsored by Buymote Shopping app

BuyMote E-Shopping Application is One of the Online Shopping App

Now Available on Play Store & App Store (Buymote E-Shopping)

Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8

Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication"

Coding_Club

i am recently completed my graduation then i start sharing IT Experience and Logically problems For Other related IT Dev,

Thanks for Visiting our Pages Guys

Post a Comment (0)
Previous Post Next Post