simulating a web server for testing.

Discussion in 'iOS Programming' started by 1458279, Mar 25, 2016.

  1. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #1
    I'm reading a few tutorials about web services and wondering if you can setup your development computer to simulate a web server.

    I've never tried this before, don't want to pay for a web server, but want to start learning how it's done.

    One tutorial talks about localhost, another tutorial:

    http://www.techrepublic.com/blog/software-engineer/ios-tutorial-part-1-creating-a-web-service/

    suggests using MAMP

    https://www.mamp.info/en/

    Q. can you simulate a web server using the same mac you use for development?

    Q. anyone have a good link on how to do this or a suggestion on how to use real world tools in a simulated web server?
     
  2. tyche macrumors 6502

    Joined:
    Jul 30, 2010
    #2
    A web server is a pretty basic thing easily run multiple ways on your own host server. If you just want to present static html pages that's it.

    If you want to dive a little deeper and build more of a framework, this is a good opportunity to learn all about node.js and the MEAN stack. You get a http service running in about a dozen lines of boilerplate code. However, you will then be in a position to grow beyond simple static pages and have dozens of libraries at your disposal. The advantage here is you will have an actual useful skill set that is in demand and closely tied with mobile development.

    node.js can be easily installed on your dev computer. Personally, I run a linux vm as I like to keep things contained and tidy but it's not necessary.

    A google search on "node.js http server" will have plenty of examples
     
  3. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #3
    Definitely, definitely use Node.js. MAMP/WAMP/XAMP/etc are difficult to learn in my opinion.
     
  4. 1458279 thread starter Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #4
    So skip MAMP, ok. Does Node.js work on a stand alone development PC without any costs?

    I don't have a need right now for a real server, but setting one up and learning how on a PC would be handy knowledge.
     
  5. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #5
    Node.js is totally free. When I am building and testing apps for clients, I usually run the Node.js server right off of my desktop machine, since I have fiber internet. It is fast enough for the entire development process and we only switch to using AWS EC2 in the very final stage.

    Node.js is absolutely fantastic, I cannot recommend it highly enough. It's very easy, very flexible, and very powerful.
     

Share This Page