A simple web server for local web development.
The Command Line, SmartGit, and Fork are probably your best bets out of the 29 options considered. 'The most powerful way to use git' is the primary reason people pick The Command Line over the competition. This page is powered by a knowledgeable community that helps you make an informed decision. Browse other questions tagged git github github-for-mac or ask your own question. The Overflow Blog Podcast 269: What tech is like in “Rest of World”. Mac App Store compatible. MacGap makes use of WebViews which is a standard feature that is available when developing native OS X apps within Xcode. The API that is added is also based on official API's provided by Apple. Therefore there are no dirty hacks, no embedded chrome browser or anything that would stand in your way for Mac App Store.
Download
Choose the .dmg
for mac, the .exe
for Windows, or the .AppImage
for Linux.
What?
Servez is an stand alone app that runs a simple web server.with a GUI to start/stop and choose a folder to serve.
I’ve worked with many people, often students, who are notcomfortable with command lines and certainly not comfortablesetting up a big server like Apache.
Servez provides them with an easy way to get started withouthaving to install multiple dependencies nor having to integratethings with their system. No adding to paths, no downloading3 different pieces of software. Just run and start.
HTTPS
Servez has an option to serve HTTPS. Servezuses a self signed certificate which means your browser will complainthat the certificate is not valid. You can click “advanced” on the warningpage and then “Proceed to <localhost>” to load the page.
The point of HTTPS support in Servez is to make it easy to access HTTPS only APIslike WebXR etc… Clicking through a warning once in a while is a small tradeoff forautomating HTTPS support.
Command Line Arguments
If you want an actual command line version then go here.
Otherwise these are the command line arguments to this app versionof Servez.
NOTE! You must include an extra --
by itself before your arguments
On Windows the default path is
on MacOS the default path is
Usage
--help
prints the command line arguments-p
or--port
sets the port as in--port=1234
--ssl
use HTTPS (see above)--no-dirs
don’t show directory listings for folders--no-cors
don’t supply CORS headers--local
only allow access from local machine--no-index
don’t serve index.html for folders
Development
Setup
Install node.js
You can download it here.
clone this repo
change to the project’s folder
install dependencies
Download Github Desktop Mac
Organization
Running
Will launch with devtools open. Setting the environment variable SERVEZ_ECHO
to true
will make issue many logging commands in main.js
into the login the app
Building
Will build a file for distribution in the dist
folder for the current platform.
Finding which process to profile
If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.
The CPU pane shows how processes are affecting CPU (processor) activity:
Click the top of the “% CPU” column to sort by the percentage of CPU capability used by each process. If one of the top processes displays a large number (80-100% or more!) then this process may be hogging the CPU and preventing the other processes from doing their tasks. This can result in slow response times, beachballing and even some applications freezing.
A process with a high '% CPU' value is worth profiling.
A process that often freezes or beachballs, even though all other applications run smoothly and '% CPU' is very low, is also worth profiling.
Xcode Command-Line Tools
Profiling is much better with the Xcode tools installed. Instruments has a command-line interface to provide detailed profiling that can be opened in the Instruments application for investigation.
To check if Xcode Command-Line Tools are installed, open a Terminal and type:
to print the path of the current developer directory. If the command-line tools are installed, the output should be a path like the following:
If not, an error message is output:
To install Xcode Command-Line Tools, type:
Profiling with Instruments
If Xcode Command-Line Tools are installed, it is best to use Instruments to profile your application. If Xcode Command-Line Tools are not installed and you would rather not install them, skip to the next section for profiling with sample
. In this example, we will show how to profile ecore
.
First, we need to find the process ID (PID) of ecore
. Open a Terminal and type:
and you should see something like this:
The first entry is the currently running instance of ecore
. (We'll ignore the second entry as it is only an artifact of the actual search). The second column is our PID., in this case 5773
.
Now that we know the PID, it's time to create a time profile for ecore
. Type the following in the Terminal:
After 30s (30'000ms), instruments
will save the profile to the Desktop and exit with a message indicating the name of the latest profile file. This file can be opened in Instruments or forwarded to a developer to understand what performance issues have arisen in ecore
on your computer.
Profiling with sample
sample
is a much simpler tool than Instruments. However, its simplicity is also why it is included in a standard Mac OS X installation. To profile ecore
using sample
, first find ecore
's PID (see above). For this example, I will assume that the PID is still 5773
. Open a Terminal and type:
This will sample process 5773
for 30s and write the profile to the given path. This file can be opened as text or forwarded to a developer to understand what performance issues have arisen in ecore
on your computer.
Improving your sample
Under the hood, sampling checks your process every 1 ms and reports what your process was doing at the time. The data might not always be pertinent.
Github Mac App Issues Windows 10
For example, if your process sleep
s a lot or is never scheduled to run by the operating system, then no sample is taken. Luckily, you can always tell the kernel that your process is important and should be scheduled more often than others. Use renice
for that. For example:
This will set the scheduling priority of your process to the maximum.
If you are using profiling to diagnose a specific operation in your process like drawing a view or listing files, you need to make sure the specific code is triggered as often as possible (by refreshing the view a lot, or performing a lot of ls
) during the sampling period.
If none of these options yield better results, or do not apply to your case, it is always possible to extend the sampling duration. 30 seconds seems a bare minimum and you will always get more data if you sample longer.