-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 09cb14d
Showing
145 changed files
with
15,299 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"project": { | ||
"name": "photography" | ||
}, | ||
"apps": [ | ||
{ | ||
"root": "src", | ||
"outDir": "dist", | ||
"assets": [ | ||
"assets", | ||
"favicon.ico" | ||
], | ||
"index": "index.html", | ||
"main": "main.ts", | ||
"polyfills": "polyfills.ts", | ||
"test": "test.ts", | ||
"tsconfig": "tsconfig.app.json", | ||
"testTsconfig": "tsconfig.spec.json", | ||
"prefix": "app", | ||
"styles": [ | ||
"styles.css" | ||
], | ||
"scripts": [], | ||
"environmentSource": "environments/environment.ts", | ||
"environments": { | ||
"dev": "environments/environment.ts", | ||
"prod": "environments/environment.prod.ts" | ||
} | ||
} | ||
], | ||
"e2e": { | ||
"protractor": { | ||
"config": "./protractor.conf.js" | ||
} | ||
}, | ||
"lint": [ | ||
{ | ||
"project": "src/tsconfig.app.json" | ||
}, | ||
{ | ||
"project": "src/tsconfig.spec.json" | ||
}, | ||
{ | ||
"project": "e2e/tsconfig.e2e.json" | ||
} | ||
], | ||
"test": { | ||
"karma": { | ||
"config": "./karma.conf.js" | ||
} | ||
}, | ||
"defaults": { | ||
"styleExt": "css", | ||
"component": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"**/**/app/**/**/js":true, | ||
"**/**/app/**/**/js.map":true, | ||
"**/**/**/app/**/**/js":true | ||
}, | ||
// Controls auto save of dirty files. Accepted values: "off", "afterDelay", "onFocusChange". If set to "afterDelay" you can configure the delay in "files.autoSaveDelay". | ||
"files.autoSave": "afterDelay" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
git remote add origin https://[email protected]/lightmagic123/photography.git | ||
git push -u origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Photography | ||
|
||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.3. | ||
|
||
## Development server | ||
|
||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
||
## Code scaffolding | ||
|
||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`. | ||
|
||
## Build | ||
|
||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. | ||
|
||
## Running unit tests | ||
|
||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). | ||
|
||
## Running end-to-end tests | ||
|
||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). | ||
Before running the tests make sure you are serving the app via `ng serve`. | ||
|
||
## Further help | ||
|
||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[0719/121807:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 | ||
[0719/121807:ERROR:node_debugger.cc(86)] Cannot start debugger server | ||
[0719/151304:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 | ||
[0719/151304:ERROR:node_debugger.cc(86)] Cannot start debugger server | ||
[0720/125239:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 | ||
[0720/125239:ERROR:node_debugger.cc(86)] Cannot start debugger server | ||
[0801/104037:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 | ||
[0801/104037:ERROR:node_debugger.cc(86)] Cannot start debugger server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { PhotographyPage } from './app.po'; | ||
|
||
describe('photography App', () => { | ||
let page: PhotographyPage; | ||
|
||
beforeEach(() => { | ||
page = new PhotographyPage(); | ||
}); | ||
|
||
it('should display message saying app works', () => { | ||
page.navigateTo(); | ||
expect(page.getParagraphText()).toEqual('app works!'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { browser, by, element } from 'protractor'; | ||
|
||
export class PhotographyPage { | ||
navigateTo() { | ||
return browser.get('/'); | ||
} | ||
|
||
getParagraphText() { | ||
return element(by.css('app-root h1')).getText(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/e2e", | ||
"module": "commonjs", | ||
"target": "es5", | ||
"types": [ | ||
"jasmine", | ||
"node" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/0.13/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular/cli'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage-istanbul-reporter'), | ||
require('@angular/cli/plugins/karma') | ||
], | ||
client:{ | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
files: [ | ||
{ pattern: './src/test.ts', watched: false } | ||
], | ||
preprocessors: { | ||
'./src/test.ts': ['@angular/cli'] | ||
}, | ||
mime: { | ||
'text/x-typescript': ['ts','tsx'] | ||
}, | ||
coverageIstanbulReporter: { | ||
reports: [ 'html', 'lcovonly' ], | ||
fixWebpackSourcePaths: true | ||
}, | ||
angularCli: { | ||
environment: 'dev' | ||
}, | ||
reporters: config.angularCli && config.angularCli.codeCoverage | ||
? ['progress', 'coverage-istanbul'] | ||
: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "photography", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"test": "ng test", | ||
"lint": "ng lint", | ||
"e2e": "ng e2e" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/common": "^4.0.0", | ||
"@angular/compiler": "^4.0.0", | ||
"@angular/core": "^4.0.0", | ||
"@angular/forms": "^4.0.0", | ||
"@angular/http": "^4.0.0", | ||
"@angular/platform-browser": "^4.0.0", | ||
"@angular/platform-browser-dynamic": "^4.0.0", | ||
"@angular/router": "^4.0.0", | ||
"body-parser": "^1.17.2", | ||
"core-js": "^2.4.1", | ||
"ejs": "^2.5.6", | ||
"express": "^4.15.3", | ||
"mongoose": "^4.10.8", | ||
"path": "^0.12.7", | ||
"rxjs": "^5.1.0", | ||
"zone.js": "^0.8.4" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "1.0.3", | ||
"@angular/compiler-cli": "^4.0.0", | ||
"@types/jasmine": "2.5.38", | ||
"@types/node": "~6.0.60", | ||
"codelyzer": "~2.0.0", | ||
"jasmine-core": "~2.5.2", | ||
"jasmine-spec-reporter": "~3.2.0", | ||
"karma": "~1.4.1", | ||
"karma-chrome-launcher": "~2.1.1", | ||
"karma-cli": "~1.0.1", | ||
"karma-jasmine": "~1.1.0", | ||
"karma-jasmine-html-reporter": "^0.2.2", | ||
"karma-coverage-istanbul-reporter": "^0.2.0", | ||
"protractor": "~5.1.0", | ||
"ts-node": "~2.0.0", | ||
"tslint": "~4.5.0", | ||
"typescript": "~2.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
const { SpecReporter } = require('jasmine-spec-reporter'); | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'./e2e/**/*.e2e-spec.ts' | ||
], | ||
capabilities: { | ||
'browserName': 'chrome' | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:4200/', | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
beforeLaunch: function() { | ||
require('ts-node').register({ | ||
project: 'e2e/tsconfig.e2e.json' | ||
}); | ||
}, | ||
onPrepare() { | ||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Get dependencies | ||
const express = require('express'); | ||
const path = require('path'); | ||
const http = require('http'); | ||
const bodyParser = require('body-parser'); | ||
|
||
const router = express.Router(); | ||
const mongoose=require('mongoose'); | ||
// Get our API routes | ||
//const api = require('./server/routes/api'); | ||
const productmaster = require('./server/routes/productmaster'); | ||
const category = require('./server/routes/category'); | ||
|
||
const port = 5000; | ||
|
||
const app = express(); | ||
|
||
// Point static path to dist | ||
app.use(express.static(path.join(__dirname, 'dist'))); | ||
|
||
mongoose.Promise = global.Promise; | ||
var mongoURI = "mongodb://localhost:27017/pos"; | ||
// var MongoDB = mongoose.connect(mongoURI).connection; | ||
// MongoDB.on('error', function(err) { console.log(err.message); }); | ||
// MongoDB.once('open', function() { | ||
// console.log("mongodb connection open"); | ||
// }); | ||
|
||
mongoose.connect(mongoURI, { useMongoClient: true }, function (ignore, connection) { | ||
connection.onOpen() | ||
}).then(() => { | ||
console.log('connected') | ||
}) | ||
.catch(console.error) | ||
|
||
|
||
// Parsers for POST data | ||
app.use(bodyParser.json()); | ||
app.use(bodyParser.urlencoded({ extended: false })); | ||
|
||
// Set our api routes | ||
//app.use('/api', api); | ||
app.use('/api', productmaster); | ||
app.use('/api', category); | ||
// Catch all other routes and return the index file | ||
app.get('*', (req, res) => { | ||
res.sendFile(path.join(__dirname, 'dist/index.html')); | ||
}); | ||
|
||
app.listen(port,function(){ | ||
console.log("Server running on localhost:"+ port); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const mongoose=require('mongoose'); | ||
|
||
const Schema = mongoose.Schema; | ||
|
||
const categorySchema = mongoose.Schema({ | ||
categoryname:{ | ||
type:String, | ||
required:true | ||
} | ||
}); | ||
|
||
module.exports = mongoose.model('category',categorySchema,'category'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const mongoose=require('mongoose'); | ||
|
||
const Schema = mongoose.Schema; | ||
|
||
const customerSchema = mongoose.Schema({ | ||
customername:{ | ||
type:String, | ||
required:true | ||
} , | ||
address:{ | ||
type:String, | ||
required:true | ||
} , | ||
phone:{ | ||
type:String, | ||
required:true | ||
} , | ||
mobile:{ | ||
type:String, | ||
required:true | ||
} | ||
}); | ||
|
||
module.exports = mongoose.model('customer',eventSchema,'customermaster'); |
Oops, something went wrong.