Posted in Nodejs

NodeJS | Run a web page

$ forever start app.js

Advertisements
Posted in iOS, Swift

iOS – Swift | Screen transition with data

Key point : Call the ‘performSegue’ function in viewDidAppear section

1. Generate Segue

Drag a mouse point from the circle of starting view controller to the ending view controller

2. Select ‘Present Modally’

3. Select the arrow line

4. Set the ‘Storyboard Segue – Identifier’

5. Insert the source code to the ‘viewDidAppear’ section at a swift file for the view controller.

    override func viewDidAppear(_ animated: Bool) {
        performSegue(withIdentifier: "SignupSegue", sender: self)
    }
Posted in Nodejs

Nodejs | Operate web server whenever power on

Add below lines to ‘/etc/rc.local’

sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000

node /home/ubuntu/landing_page/landing_page.js

 

External mobule is also available like ‘forever’ for settingĀ the server to execute nodejs script whenever the machine is on.