Downloading and Installing Swift

While most Swift-solutions will be hosted on our cloud-servers, you will often need to install a solution locally for development or staging purposes.

Like other ‘pre-packaged’ solutions, a Swift-solution consists of two things:

  • A files-folder with design files, images, and other static resources (css, js, etc.)
  • A database with example data – pages, products, users, etc.

The basic installation procedure may also be familiar:

  1. Prepare the hosting environment
  2. Install a Dynamicweb application
  3. Download the Swift Files-folder and database – you can:
    • Go to the documentation portal and download a zip
    • Clone our Swift GitHub repository – see more details about this path below
  4. Follow the guide to installing a pre-existing solution

If you’re a tinkerer, cloning our Swift GitHub repository may be the right option for you – see  the GitHub documentation on cloning a repository for more information.

For technical reasons our GitHub repository does not contain the following:

  • Database
  • Images-folder

You can download these separately from the documentation portal as a part of the regular download package for Swift.

Swift uses webpack to calculate dependencies and bundle scripts, images, and other assets.

When downloading a zipped solution, the design is already compiled – but when cloned from GitHub the design must be built:

  1. Download and install Node.js
  2. Open a command prompt and navigate to folder Swift is cloned to
  3. Run npm install
  4. Run npm run build:webpack
  5. Run npm run start

The connection between a solution and a database is stored (alongside many other settings) in a file called GlobalSettings.config. This file is part of the repository, which means that it will be overwritten whenever you pull from the GitHub repository.

To solve this potential issue and save you minutes once in a while, you can create a partial configuration file called globalsettings.database.config with the database-node from the config file inside the /Files folder. Whenever the solution is accessed this file will be used in place of the database node in globalsettings – and it will not be overwritten:

XML
<?xml version="1.0"?> <Globalsettings> <System> <Database> <Password>yourpassword</Password> <Type>ms_sqlserver</Type> <UserName>yourSQLusername</UserName> <Database>yourdatabasename</Database> <SQLServer>localhost</SQLServer> <DWWebIP> </DWWebIP> <SQLServer2> </SQLServer2> <Database2> </Database2> <UserName2> </UserName2> <Password2> </Password2> <IntegratedSecurity>False</IntegratedSecurity> <ConnectionString> </ConnectionString> <ConnectionString2> </ConnectionString2> </Database> </System> </Globalsettings>