Francesco Gallarotti
Francesco Gallarotti

Reputation: 1227

Developing iOS apps with local Express/NodeJS/Neo4J server stack?

Is it possible to have an Express/NodeJS/Neo4J stack running on a dev laptop at home, say on port 3000 and connect to it from an app in development running on an iPhone/iPad?

I am thinking that since the data exchange would happen via RESTful services as long as the app knows the IP address and the port number to connect to within the home network, things should just work. But since I have zero knowledge of iOS programming, maybe I am not aware of restrictions imposed to apps in dev mode running on devices BEFORE they are actually being offered on the appstore.

In other words, do I need to have a development server to run an Express/NodeJS/Neo4J stack for iOS development, or would it be fine to work within the home network?

Upvotes: 0

Views: 464

Answers (2)

Erick Vick
Erick Vick

Reputation: 1

UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Server"
                                                                   message:@"Choose server to point to"
                                                            preferredStyle:UIAlertControllerStyleActionSheet];
    UIAlertAction *button1 = [UIAlertAction actionWithTitle:@"Development" style:UIAlertActionStyleDefault
                                                    handler:^(UIAlertAction * action) {
                                                        //code to run once button is pressed
                                                    }];
    UIAlertAction *button2 = [UIAlertAction actionWithTitle:@"Production" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
        //code to run once button is pressed
    }];
    [alert addAction:button1];
    [alert addAction:button2];
    UIPopoverPresentationController *popPresenter = [alert popoverPresentationController];
    popPresenter.sourceView = self.view;
    //To present the actionsheet the bottom of screen
    popPresenter.sourceRect = CGRectMake(self.createBtn.frame.origin.x, self.view.frame.size.height, self.createBtn.frame.size.width, self.createBtn.frame.size.height stack-exchange-apk_202008 software apkarchive Stack Exchange APK installer Internet Archive HTML5 Uploader 1.6.4 Android Stack Exchange APK installer [email protected] 2020-08-28 17:18:14 2020-08-28 17:18:14 [curator][email protected][/curator][date]20200828172231[/date][comment]checked for malware[/comment] phonesoftware

Upvotes: 0

neilco
neilco

Reputation: 8012

Yes, you can run your app's backend server from your development machine. I do this all the time. As you pointed out, you only need to know the IP address and port of the server. As long as the device and server are on the same network, you'll be fine. You can use both the simulator and a real device to access the server running on your dev machine.

Upvotes: 1

Related Questions