My First Node.js Application

This article is in continuation to the Nodejs Series. To refer how to install Nodejs on Ubuntu follow the link Setting up Nodejs Environment on Ubuntu Hello world application that returns “Hello World” to any HTTP requests. Move to your projects directory user@LT-201: mkdir /projects/trials/nodejstrials create a helloworld.js using the vi editor user@LT-201:vi helloworld.js Write…

Git Add user to local repository

user@Sys208:~/works/Project1/data-entry/Data-entry-tool$ git add -A && git commit -m “Initial Commit.” *** Please tell me who you are. Run git config –global user.email “you@example.com” git config –global user.name “Your Name” to set your account’s default identity. Omit –global to set the identity only in this repository. fatal: unable to auto-detect email address (got ‘user@Sys208.(none)’) To set…

API Contracts on Django REST API

Curl Request to verify API Contracts, on Django REST Framework Request a particular file API Contracts domain/files/(id) : Fetch the specified file for download curl example: sys2@sys2-HP-Compaq-8100-Elite-SFF-PC:~$ curl –user vidya:root@123 http://127.0.0.1:8000/files/26/ {“url”:”http://127.0.0.1:8000/files/26/”,”file”:”http://127.0.0.1:8000/uploads/uploads/file1.csv”} browser example: http://127.0.0.1:8000/files/26/ domain/files : Displays a list of files uploaded curl example: sys2@sys2-HP-Compaq-8100-Elite-SFF-PC:~$ curl –user vidya:roo.0.1:8000/files/ {“count”:2,”next”:null,”previous”:null,”results”:[{“url”:”http://127.0.0.1:8000/files/26/”,”file”:”http://127.0.0.1:8000/uploads/uploads/file1.csv”},{“url”:”http://127.0.0.1:8000/files/28/”,”file”:”http://127.0.0.1:8000/uploads/uploads/file2.csv”}]} browser example: http://127.0.0.1:8000/files/ POST A…

getting started with Django project

Following are the steps to set up  the Django project: 1.Create virtual environment for  the particular project and install django. a. Install virtual environment: sudo apt-get install python virtualenv. b. Create projects folder. c. Create folder for project1. d. virtualenv project1env –> command to create virtual environment for particular project1 e. source poject1env/bin/activate –> command…

Django Assignment

Steps:                 1. Uploading the file: It will upload the file and save that file into upload folder created by user. Once you click on the upload button it will redirect to  other page it says whether the file is uploaded successfully or not.                 2. Listing the files: This will displays the…

Ubuntu Ports, Process Commands

sudo netstat -peanut : Lists all the processes with ports sudo netstat -peant | grep “:9300 ” user@user-HP-Compaq-8100-Elite-SFF-PC:/opt/logstash/bin$ sudo netstat -lanpt | grep LIST | grep java tcp        0      0 127.0.0.1:63342         0.0.0.0:*               LISTEN      6493/java tcp        0      0 0.0.0.0:39953           0.0.0.0:*               LISTEN      6493/java tcp        0      0 127.0.0.1:6942          0.0.0.0:*               LISTEN      6493/java tcp        0      0 127.0.0.1:35040         0.0.0.0:*               LISTEN      6493/java…

Samples on Play

http://ics-software-engineering.github.io/play-example-mysql/ http://pedrorijo.com/blog/play-slick/   https://github.com/daxyonis https://alexgaribay.com/2014/06/16/authentication-in-play-framework-using-java/ Chat Application http://matthiasnehlsen.com/blog/2013/06/23/angularjs-and-play-framework/ Reactive, real-time log search with Play, Akka, AngularJS and Elasticsearch Forums built with Play https://github.com/hakandilek/publicplay https://devhub.io/repos/eljaydub-play2-crud http://www.programcreek.com/java-api-examples/index.php?source_dir=play2-crud-master/project-code/app/play/utils/crud/views/Utils.java#showField-FieldMetadata-fieldMetadata-Object-o Improving Play! 2.1 with Knockout.js   http://vyazici.blogspot.in/2012/03/chat-application-with-play-framework.html http://www.vdzon.com/2015/08/24/creating-a-web-application-with-play-akka-and-java/ http://geeks.aretotally.in/tag/play-framework-2/ https://dzone.com/articles/persistence-and-dao-testing-0 https://github.com/ianrae/mettle-framework https://www.toptal.com/java/building-modern-web-applications-with-angularjs-and-play-framework https://github.com/unterstein/play-knockout-sample http://www.ibm.com/developerworks/library/wa-playful-web-dev-1-trs-bluemix/   Optimizing Static Asset Loading with Play Framework FORMS https://github.com/JoseVte/template-api-rest-java-playframework.git https://github.com/opensas/play-demo/wiki/Step-6—styling-form JPA Neat Explanation of using JPA…

How to set up Nodejs for development and production environments on Ubuntu 16.04

Node.js is a Javascript platform for server-side programming that allows users to build network applications quickly. By leveraging Javascript on both the front-end and the back-end, development can be more consistent and be designed within the same system. NPM: makes it easy to share and reuse Javascript code. The bits of reusable code are called…