Skip to content

Commit 724c98a

Browse files
committed
first commit
1 parent 6897b7a commit 724c98a

File tree

68 files changed

+13900
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+13900
-22
lines changed

README.md

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,68 @@
1-
# Node.js Rest APIs with Express, Sequelize & MySQL example
1+
# Angular 11 Node.js MySQL CRUD example
2+
3+
In this tutorial, I will show you how to build a full-stack (Angular 11 + Node.js + Express + MySQL) example with a CRUD Application. The back-end server uses Node.js + Express for REST APIs, front-end side is an Angular App with HTTPClient.
4+
5+
We will build a full-stack Tutorial Application in that:
6+
- Tutorial has id, title, description, published status.
7+
- User can create, retrieve, update, delete Tutorials.
8+
- There is a search box for finding Tutorials by title.
9+
10+
![angular-12-node-js-mysql-crud-example](angular-12-node-js-mysql-crud-example.png)
11+
12+
Tutorial link: [Angular 12 + Node.js Express + MySQL example](https://bezkoder.com/angular-12-node-js-express-mysql/)
213

314
For more detail, please visit:
15+
> [Angular 12 CRUD Application example with Web API](https://bezkoder.com/angular-12-crud-app/)
16+
417
> [Build Node.js Rest APIs with Express, Sequelize & MySQL](https://bezkoder.com/node-js-express-sequelize-mysql/)
518
19+
> [How to integrate Angular 12 with Node.js Restful Services](https://bezkoder.com/integrate-angular-12-node-js/)
20+
21+
More Practice:
22+
> [Angular 12 Pagination example | ngx-pagination](https://bezkoder.com/angular-12-pagination-ngx/)
23+
24+
> [Angular 12 JWT Authentication & Authorization with Web API](https://bezkoder.com/angular-12-jwt-auth/)
25+
26+
> [Angular 12 File upload example with progress bar & Bootstrap](https://bezkoder.com/angular-12-file-upload/)
27+
28+
> [Node.js Express File Upload Rest API example](https://bezkoder.com/node-js-express-file-upload/)
29+
630
> [Server side Pagination in Node.js with Sequelize and MySQL](https://bezkoder.com/node-js-sequelize-pagination-mysql/)
731
832
> [Deploying/Hosting Node.js app on Heroku with MySQL database](https://bezkoder.com/deploy-node-js-app-heroku-cleardb-mysql/)
933
1034
Security:
11-
> [Node.js Express: JWT example | Token Based Authentication & Authorization](https://bezkoder.com/node-js-jwt-authentication-mysql/)
35+
> [Angular 12 + Node.js Express: JWT Authentication and Authorization example](https://bezkoder.com/node-js-angular-12-jwt-auth/)
1236
1337
Associations:
1438
> [Sequelize Associations: One-to-Many Relationship example](https://bezkoder.com/sequelize-associate-one-to-many/)
1539
1640
> [Sequelize Associations: Many-to-Many Relationship example](https://bezkoder.com/sequelize-associate-many-to-many/)
1741
18-
Fullstack:
19-
> [Vue.js + Node.js + Express + MySQL example](https://bezkoder.com/vue-js-node-js-express-mysql-crud-example/)
20-
21-
> [Vue.js + Node.js + Express + MongoDB example](https://bezkoder.com/vue-node-express-mongodb-mevn-crud/)
22-
23-
> [Angular 8 + Node.js + Express + MySQL example](https://bezkoder.com/angular-node-express-mysql/)
24-
25-
> [Angular 10 + Node.js + Express + MySQL example](https://bezkoder.com/angular-10-node-js-express-mysql/)
26-
27-
> [Angular 11 + Node.js Express + MySQL example](https://bezkoder.com/angular-11-node-js-express-mysql/)
28-
42+
Fullstack with Node.js Express:
2943
> [Angular 12 + Node.js Express + MySQL example](https://bezkoder.com/angular-12-node-js-express-mysql/)
3044
31-
> [React + Node.js + Express + MySQL example](https://bezkoder.com/react-node-express-mysql/)
45+
> [Angular 12 + Node.js + Express + PostgreSQL example](https://bezkoder.com/angular-12-node-js-express-postgresql/)
3246
33-
Integration (run back-end & front-end on same server/port)
34-
> [Integrate React with Node.js Restful Services](https://bezkoder.com/integrate-react-express-same-server-port/)
47+
> [Angular 12 + Node.js Express + MongoDB example](https://bezkoder.com/angular-12-mongodb-node-js-express/)
3548
36-
> [Integrate Angular with Node.js Restful Services](https://bezkoder.com/integrate-angular-10-node-js/)
49+
Serverless with Firebase:
50+
> [Angular 12 Firebase CRUD with Realtime DataBase | AngularFireDatabase](https://bezkoder.com/angular-12-firebase-crud/)
3751
38-
> [Integrate Vue with Node.js Restful Services](https://bezkoder.com/serve-vue-app-express/)
52+
> [Angular 12 Firestore CRUD example with AngularFireStore](https://bezkoder.com/angular-12-firestore-crud-angularfirestore/)
53+
54+
> [Angular 12 Firebase Storage: File Upload/Display/Delete example](https://bezkoder.com/angular-12-file-upload-firebase-storage/)
3955
4056
## Project setup
57+
58+
### Node.js Server
4159
```
42-
npm install
60+
cd node-js-server
61+
node server.js
4362
```
4463

45-
### Run
64+
### Angular Client
4665
```
47-
node server.js
66+
cd angular-11-client
4867
```
68+
Run `ng serve --port 8081` for a dev server. Navigate to `http://localhost:8081/`.

angular-12-client/.browserslistrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

angular-12-client/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

angular-12-client/.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
16+
# IDEs and editors
17+
/.idea
18+
.project
19+
.classpath
20+
.c9/
21+
*.launch
22+
.settings/
23+
*.sublime-workspace
24+
25+
# IDE - VSCode
26+
.vscode/*
27+
!.vscode/settings.json
28+
!.vscode/tasks.json
29+
!.vscode/launch.json
30+
!.vscode/extensions.json
31+
.history/*
32+
33+
# misc
34+
/.sass-cache
35+
/connect.lock
36+
/coverage
37+
/libpeerconnection.log
38+
npm-debug.log
39+
yarn-error.log
40+
testem.log
41+
/typings
42+
43+
# System Files
44+
.DS_Store
45+
Thumbs.db

angular-12-client/README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Angular 12 CRUD application example with Web API
2+
3+
Build an Angular 12 CRUD Application to consume Web APIs, display, modify & search data.
4+
5+
Tutorial Application in that:
6+
- Each Tutorial has id, title, description, published status.
7+
- We can create, retrieve, update, delete Tutorials.
8+
- There is a Search bar for finding Tutorials by title.
9+
10+
![angular-12-crud-application-example-web-api](angular-12-crud-application-example-web-api.png)
11+
12+
For instruction, please visit:
13+
> [Angular 12 CRUD Application example with Web API](https://bezkoder.com/angular-12-crud/)
14+
15+
> [Angular 12 Pagination example | ngx-pagination](https://bezkoder.com/angular-12-pagination-ngx/)
16+
17+
> [Angular 12 JWT Authentication & Authorization with Web API](https://bezkoder.com/angular-12-jwt-auth/)
18+
19+
> [Angular 12 File upload example with progress bar & Bootstrap](https://bezkoder.com/angular-12-file-upload/)
20+
21+
> [Angular 12 Multiple Files upload example with Progress Bar](https://bezkoder.com/angular-12-multiple-file-upload/)
22+
23+
> [Angular 12 Form Validation example (Reactive Forms)](https://bezkoder.com/angular-12-form-validation/)
24+
25+
Fullstack with Node.js:
26+
27+
> [Angular 12 + Node.js Express + MySQL example](https://bezkoder.com/angular-12-node-js-express-mysql/)
28+
29+
> [Angular 12 + Node.js + Express + PostgreSQL example](https://bezkoder.com/angular-12-node-js-express-postgresql/)
30+
31+
> [Angular 12 + Node.js Express + MongoDB example](https://bezkoder.com/angular-12-mongodb-node-js-express/)
32+
33+
Fullstack with Spring Boot:
34+
35+
> [Angular 12 + Spring Boot + H2 Embedded Database example](https://bezkoder.com/angular-12-spring-boot-crud/)
36+
37+
> [Angular 12 + Spring Boot + MySQL example](https://bezkoder.com/angular-12-spring-boot-mysql/)
38+
39+
> [Angular 12 + Spring Boot + PostgreSQL example](https://bezkoder.com/angular-12-spring-boot-postgresql/)
40+
41+
> [Angular 12 + Spring Boot + MongoDB example](https://bezkoder.com/angular-12-spring-boot-mongodb/)
42+
43+
> [Angular 12 + Spring Boot: File upload example](https://bezkoder.com/angular-12-spring-boot-file-upload/)
44+
45+
Security:
46+
> [Angular 12 + Spring Boot: JWT Authentication and Authorization example](https://bezkoder.com/angular-12-spring-boot-jwt-auth/)
47+
48+
> [Angular 12 + Node.js Express: JWT Authentication and Authorization example](https://bezkoder.com/node-js-angular-12-jwt-auth/)
49+
50+
Serverless with Firebase:
51+
> [Angular 12 Firebase CRUD with Realtime DataBase | AngularFireDatabase](https://bezkoder.com/angular-12-firebase-crud/)
52+
53+
> [Angular 12 Firestore CRUD example with AngularFireStore](https://bezkoder.com/angular-12-firestore-crud-angularfirestore/)
54+
55+
> [Angular 12 Firebase Storage: File Upload/Display/Delete example](https://bezkoder.com/angular-12-file-upload-firebase-storage/)
56+
57+
Integration (run back-end & front-end on same server/port)
58+
> [How to Integrate Angular with Node.js Restful Services](https://bezkoder.com/integrate-angular-10-node-js/)
59+
60+
> [How to Integrate Angular with Spring Boot Rest API](https://bezkoder.com/integrate-angular-12-spring-boot/)
61+
62+
## Development server
63+
64+
Run `ng serve --port 8081` for a dev server. Navigate to `http://localhost:8081/`. The app will automatically reload if you change any of the source files.
65+
66+
## Code scaffolding
67+
68+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
69+
70+
## Build
71+
72+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
73+
74+
## Running unit tests
75+
76+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
77+
78+
## Running end-to-end tests
79+
80+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
81+
82+
## Further help
83+
84+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
Loading

angular-12-client/angular.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"Angular12Crud": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
13+
"root": "",
14+
"sourceRoot": "src",
15+
"prefix": "app",
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "./static",
21+
"index": "src/index.html",
22+
"main": "src/main.ts",
23+
"polyfills": "src/polyfills.ts",
24+
"tsConfig": "tsconfig.app.json",
25+
"assets": [
26+
"src/favicon.ico",
27+
"src/assets"
28+
],
29+
"styles": [
30+
"src/styles.css"
31+
],
32+
"scripts": []
33+
},
34+
"configurations": {
35+
"production": {
36+
"budgets": [
37+
{
38+
"type": "initial",
39+
"maximumWarning": "500kb",
40+
"maximumError": "1mb"
41+
},
42+
{
43+
"type": "anyComponentStyle",
44+
"maximumWarning": "2kb",
45+
"maximumError": "4kb"
46+
}
47+
],
48+
"fileReplacements": [
49+
{
50+
"replace": "src/environments/environment.ts",
51+
"with": "src/environments/environment.prod.ts"
52+
}
53+
],
54+
"outputHashing": "all"
55+
},
56+
"development": {
57+
"buildOptimizer": false,
58+
"optimization": false,
59+
"vendorChunk": true,
60+
"extractLicenses": false,
61+
"sourceMap": true,
62+
"namedChunks": true
63+
}
64+
},
65+
"defaultConfiguration": "production"
66+
},
67+
"serve": {
68+
"builder": "@angular-devkit/build-angular:dev-server",
69+
"configurations": {
70+
"production": {
71+
"browserTarget": "Angular12Crud:build:production"
72+
},
73+
"development": {
74+
"browserTarget": "Angular12Crud:build:development"
75+
}
76+
},
77+
"defaultConfiguration": "development"
78+
},
79+
"extract-i18n": {
80+
"builder": "@angular-devkit/build-angular:extract-i18n",
81+
"options": {
82+
"browserTarget": "Angular12Crud:build"
83+
}
84+
},
85+
"test": {
86+
"builder": "@angular-devkit/build-angular:karma",
87+
"options": {
88+
"main": "src/test.ts",
89+
"polyfills": "src/polyfills.ts",
90+
"tsConfig": "tsconfig.spec.json",
91+
"karmaConfig": "karma.conf.js",
92+
"assets": [
93+
"src/favicon.ico",
94+
"src/assets"
95+
],
96+
"styles": [
97+
"src/styles.css"
98+
],
99+
"scripts": []
100+
}
101+
}
102+
}
103+
}
104+
},
105+
"defaultProject": "Angular12Crud"
106+
}

0 commit comments

Comments
 (0)