Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was
2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
|echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc|
|curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1|
|make install # ok, fine, this step probably takes more than 30 seconds...|
|curl https://www.npmjs.org/install.sh | sh|
|var parser = document.createElement('a');|
|parser.href = "http://example.com:3000/pathname/?search=test#hash";|
|parser.protocol; // => "http:"|
|parser.hostname; // => "example.com"|
|parser.port; // => "3000"|
|parser.pathname; // => "/pathname/"|
|parser.search; // => "?search=test"|
|parser.hash; // => "#hash"|
|parser.host; // => "example.com:3000"|
minus + shift + s and
return to chop/fold long lines!
Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...
(For more info and other projects, visit http://xem.github.io)
|The MIT License (MIT)|
|Copyright (c) 2015 Justin Perry|
|Permission is hereby granted, free of charge, to any person obtaining a copy of|
|this software and associated documentation files (the "Software"), to deal in|
|the Software without restriction, including without limitation the rights to|
|use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of|
|the Software, and to permit persons to whom the Software is furnished to do so,|
|subject to the following conditions:|
Assuming you don't want to statically
export a Sapper app, most of the parts to build a simple SSG for Svelte already exist. The only thing that is missing is the tooling ('only').
However, you don't need a lot to get things going: just a couple of rollup builds and a config file will get you most of the way there. Just some glue.
What follows is a bunch of rambling, half thought out thoughts on how I would probably go about this. Most of the stuff discussed here is stuff I've actually done or half done or am in the process of doing with varying degrees of success. It is something I'll be spending more time on in the future. There are other things I have done, want to do, or think would be a good idea that are not listed here as they don't fall into the scope of a simple SSG.
*Dislaimer: This is how I would build an SSG, this isn't the only way, but I like this approach as there are a bunch of compile-time optimisations you can per