Skip to content

Logging exp #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ Before using this project, make sure you have the following installed on your sy
## Usage
Once the container is up and running

some post instalation
install php dependencies
`docker exec -w /myapp -i php composer install`
install node dependencies for mock node server
`docker exec -w /be-server -i php7-starter-be-server-1 npm install`

1. The app: `http://localhost:3000/learning/variables` is the example php page for accessing the learnings.
2. For getting PHP setup inforamtion, `http://localhost:3000/info`
3. An example cake PHP application `http://localhost:3000/users` showing the same example as point 1, but generated MVC classes, full crud :)
2. The phpMyAdmin MySQL client app `http://localhost:3001` Login - UN: `myuser`, PW: `mypassword`
4. The phpMyAdmin MySQL client app `http://localhost:3001` Login - UN: `myuser`, PW: `mypassword`
5. You can send a udp test connection `docker exec -w /be-server -i php7-starter-be-server-1 node client.js`

## Customization
Feel free to customize this project according to your needs. Here are a few areas you might want to consider:
Expand All @@ -47,3 +54,6 @@ If you would like to contribute to this project, please follow these steps:

## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

`docker exec -w /classcharts -i dev_classcharts_web ./bin/cake migrations migrate`
`docker exec -w /classcharts -i dev_classcharts_web ./bin/cake migrations seed `
1 change: 1 addition & 0 deletions be-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
23 changes: 23 additions & 0 deletions be-server/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const UDP = require('dgram')

const client = UDP.createSocket('udp4')

const port = 1514;

const hostname = '0.0.0.0';

client.on('message', (message, info) => {
console.log('Address: ', info.address, 'Port: ', info.port, 'Size: ', info.size)

console.log('Message from server', message.toString())
})

const packet = Buffer.from('This is a message from client')

client.send(packet, port, hostname, (err) => {
if (err) {
console.error('ERROR: in sending packet')
} else {
console.log('Packet sent !!')
}
})
13 changes: 13 additions & 0 deletions be-server/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"watch": ["./"],
"ext": "js",
"env": {
"NODE_ENV": "development"
}
}
Loading