Skip to content

Commit 3b74309

Browse files
committed
added lamp docker
1 parent 40422f7 commit 3b74309

File tree

1,262 files changed

+71025
-528102
lines changed

Some content is hidden

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

1,262 files changed

+71025
-528102
lines changed

Diff for: .DS_Store

6 KB
Binary file not shown.

Diff for: .gitignore

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,2 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### WordPress template
3-
*.log
4-
.htaccess
5-
sitemap.xml
6-
sitemap.xml.gz
7-
wp-config.php
8-
wp-content/advanced-cache.php
9-
wp-content/backup-db/
10-
wp-content/backups/
11-
wp-content/blogs.dir/
12-
wp-content/cache/
13-
wp-content/upgrade/
14-
# wp-content/uploads/
15-
wp-content/wp-cache-config.php
16-
wp-content/plugins/hello.php
17-
18-
/readme.html
19-
/license.txt
20-
211
.idea
2+
node_modules

Diff for: README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Wordpress reastapi Angular (>2)
2+
3+
I'm rewriting this app ground up.
4+
If you interested you can see the previous solution in the branch [v.1.0](https://github.com/artemdemo/wordpress-restapi-angular2/tree/v.1.0)
5+
6+
## Installation dev environment
7+
8+
I'm using [dockie/lamp](http://github.com/robloach/dockie)
9+
10+
**Features**
11+
12+
* [Dockie](../dockie)
13+
* [Apache](https://httpd.apache.org/) 2.4.7
14+
* [PHP](http://php.net/) 5.5.9
15+
* [MySQL](http://www.mysql.com/) 5.5.37
16+
* [phpMyAdmin](http://www.phpmyadmin.net/) 4.0.10
17+
* [Composer](http://getcomposer.org) 1.0.0-alpha8
18+
19+
1. Get last image
20+
```
21+
docker pull dockie/lamp
22+
```
23+
24+
2. Install container
25+
```
26+
docker run -d -p 8000:80 -p 2200:22 -p 3306:3306 -v $(pwd)/www:/var/www/html:rw dockie/lamp
27+
```
28+
29+
Site will be available at http://localhost:8000/
30+
31+
3. Adding `wordpress` bd - http://localhost:8000/phpmyadmin
32+
33+
4. Copy last [wordpress CMS](https://wordpress.org/download/) to `www` folder
34+
35+
**MySQL**
36+
37+
Connect on `localhost:3306`, user `root`, password `root`.
38+
39+
## Links to webpack with angular starter
40+
41+
https://github.com/preboot/angular-webpack

Diff for: index.php

-17
This file was deleted.

Diff for: package.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "wordpress-restapi-angular2",
3+
"version": "1.0.0",
4+
"description": "## Installation dev environment",
5+
"main": "index.js",
6+
"scripts": {
7+
"start": "npm run watch",
8+
"watch": "webpack --watch --progress --profile",
9+
"build": "webpack --progress --profile --bail",
10+
"test": "echo \"Error: no test specified\" && exit 1"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/artemdemo/wordpress-restapi-angular2.git"
15+
},
16+
"keywords": [
17+
"wordpress",
18+
"restapi",
19+
"angular"
20+
],
21+
"author": "Artem Demo",
22+
"license": "ISC",
23+
"bugs": {
24+
"url": "https://github.com/artemdemo/wordpress-restapi-angular2/issues"
25+
},
26+
"homepage": "https://github.com/artemdemo/wordpress-restapi-angular2#readme",
27+
"dependencies": {
28+
"@angular/common": "^4.0.1",
29+
"@angular/compiler": "^4.0.1",
30+
"@angular/core": "^4.0.1",
31+
"@angular/forms": "^4.0.1",
32+
"@angular/http": "^4.0.1",
33+
"@angular/platform-browser": "^4.0.1",
34+
"@angular/platform-browser-dynamic": "^4.0.1",
35+
"@angular/router": "^4.0.1",
36+
"bootstrap": "^3.3.7",
37+
"clean-webpack-plugin": "^0.1.16",
38+
"core-js": "^2.4.1",
39+
"css-loader": "^0.28.0",
40+
"extract-text-webpack-plugin": "^2.1.0",
41+
"html-loader": "^0.4.5",
42+
"html-webpack-plugin": "^2.28.0",
43+
"json-loader": "^0.5.4",
44+
"less": "^2.7.2",
45+
"less-loader": "^4.0.3",
46+
"reflect-metadata": "^0.1.10",
47+
"rxjs": "^5.3.0",
48+
"style-loader": "^0.16.1",
49+
"ts-loader": "^2.0.3",
50+
"typescript": "^2.2.2",
51+
"url-loader": "^0.5.8",
52+
"webpack": "^2.3.3",
53+
"zone.js": "^0.8.5"
54+
},
55+
"devDependencies": {}
56+
}

Diff for: readme.md

-53
This file was deleted.

Diff for: source/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Source of frontend app

Diff for: source/app/app.component.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<header>
2+
<nav>
3+
<a [routerLink]="['']">Home</a>
4+
<a [routerLink]="['about']">About</a>
5+
</nav>
6+
</header>
7+
<main>
8+
<h1>Hello from {{title}}!</h1>
9+
10+
<router-outlet></router-outlet>
11+
</main>
12+
<footer>
13+
<a [href]="url">Webpack Angular 2 Starter</a>
14+
</footer>

Diff for: source/app/app.component.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'my-app', // <my-app></my-app>
5+
templateUrl: './app.component.html',
6+
})
7+
export class AppComponent {
8+
constructor() {
9+
}
10+
}

Diff for: source/app/app.module.ts

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { NgModule, ApplicationRef } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { HttpModule } from '@angular/http';
4+
import { FormsModule } from '@angular/forms';
5+
6+
// import { ApiService } from './shared';
7+
import { AppComponent } from './app.component';
8+
import { HomeView } from '../views/home.view';
9+
import { routing } from './app.routing';
10+
11+
@NgModule({
12+
imports: [
13+
BrowserModule,
14+
HttpModule,
15+
FormsModule,
16+
routing
17+
],
18+
declarations: [
19+
AppComponent,
20+
HomeView,
21+
],
22+
providers: [],
23+
bootstrap: [AppComponent]
24+
})
25+
export class AppModule {
26+
constructor(public appRef: ApplicationRef) {}
27+
}

Diff for: source/app/app.routing.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import { RouterModule, Routes } from '@angular/router';
3+
4+
import { HomeView } from '../views/home.view';
5+
6+
const routes: Routes = [
7+
{ path: '', component: HomeView },
8+
];
9+
10+
export const routing = RouterModule.forRoot(routes);

Diff for: source/index.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//import { enableProdMode } from '@angular/core';
2+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3+
import { AppModule } from './app/app.module';
4+
5+
// depending on the env mode, enable prod mode or add debugging modules
6+
// if (ENV.production === 'production') {
7+
// enableProdMode();
8+
// }
9+
10+
export function main() {
11+
return platformBrowserDynamic().bootstrapModule(AppModule);
12+
}
13+
14+
if (document.readyState === 'complete') {
15+
main();
16+
} else {
17+
document.addEventListener('DOMContentLoaded', main);
18+
}

Diff for: source/views/home.view.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
Home Works!
3+
</p>

Diff for: source/views/home.view.less

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// component styles are encapsulated and only applied to their components
2+
* {
3+
color: #FFEF00;
4+
}

Diff for: source/views/home.view.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'home-view',
5+
templateUrl: './home.view.html',
6+
styleUrls: ['./home.view.less']
7+
})
8+
export class HomeView implements OnInit {
9+
10+
constructor() {
11+
// Do stuff
12+
}
13+
14+
ngOnInit() {
15+
console.log('Hello Home');
16+
}
17+
18+
}

Diff for: theme/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## RESTAPI with Angular
2+
3+
Theme files

0 commit comments

Comments
 (0)