Skip to content

Commit

Permalink
Added windows documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DomPeliniAerospike committed Feb 16, 2024
1 parent 333091d commit 8680a05
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 32 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ To install library prerequisites using `apt`:
sudo apt install g++ libssl libssl-dev zlib1g-dev
```

### Windows

See our [Windows README.md](https://github.com/aerospike/aerospike-client-nodejs/blob/master/README_WINDOWS.md) for details on how to build and install on windows.

### macOS

Before starting with the Aerospike Nodejs Client, verify that you have the following prerequisites:
Expand Down
37 changes: 22 additions & 15 deletions README_WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,44 @@
[appveyor-image]: https://ci.appveyor.com/api/projects/status/1pwlt87blqrmgyis/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/aerospike/aerospike-client-nodejs/

The Aerospike Node.js client port to Windows is a community supported project
and suitable for application prototyping and development.

<a name="Prerequisites"></a>
## Prerequisites

* Windows 7 or later
* Node.js v10.x (LTS) or later
Visual Studio is used to manage the Aerospike Node.js Client on Windows. Many components can be installed using the Visual Studio installer. Neccessary components include:

* C++ core features
* MSVC (v143 recommended)
* Windows SDK (11 recommended)

The package includes a native add-on. To compile the add-on, Microsoft's Visual
C++ Build Tools 2015 are required, which you can download from the
[Visual Studio website](https://visualstudio.microsoft.com/vs/older-downloads/).
The required components are:
Powershell 7 is required to build the project. DO NOT use Windows Powershell; it will cause your install to fail.

* Windows 8.1 SDK
* Visual C++ 2015 (v140) Toolset for Desktop
Python 3.11 or below is also required to build the project.

![Windows 8.1 SDK](./docs/assets/windows-8-1-sdk.png)
![VC++ 2015.3 v14.00 (v140) toolset for desktop](./docs/assets/vc-2015-3-v140.png)
When building the project, make sure the full path of the project directory does not have any spaces. C:\Users\Administrator\Documents\Visual Studio 2022\aerospike will fail to build.
The error given will be `error MSB1008: Only one project can be specified`.

<a name="aerospike-c-client-sdk"></a>
## Aerospike C Client SDK

The Aerospike Node.js client depends on the Aerospike C client. During
installation, a copy of the C client SDK is downloaded and compiled.

Additionally, a set of pre-built, third-party libraries are downloaded and
installed via the
[`aerospike-client-c-dependencies`](https://www.nuget.org/packages/aerospike-client-c-dependencies)
nuget package. Please refer to the [Aerospike C client
nuget package. These dependencies are required to build the project on Windows. To download these dependencies, use `nuget restore aerospike.sln` inside the `aerospike-client-c/vs` folder, or simply restoring the package inside the solution view of visual studio.

Please refer to the [Aerospike C client
documentation](https://github.com/aerospike/aerospike-client-c/tree/master/vs)
for further information.
for further information on the visual studio build steps.

## Builidng the C Client dependency

If you are building on a local machine, you will need to build the C Cient dependency. This can be achieved by using the build script located at `scripts\build-package.ps1`

## Install the Aerospike Node.js Client

If you only wish to install the Client, the `aerospike` npm package supports windows installation using [nvm-windows](https://github.com/coreybutler/nvm-windows).

<a name="FAQ"></a>
## Frequently Asked Questions
Expand Down
4 changes: 2 additions & 2 deletions lib/lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ exports.clear = function (bin) {
}

/**
* @summary Creates map create operation.
* @summary Creates list create operation.
*
*
* @param {string} bin - bin name.
Expand All @@ -1098,7 +1098,7 @@ exports.clear = function (bin) {
*
* const Aerospike = require('aerospike')
* const lists = Aerospike.lists
* const key = new Aerospike.Key('test', 'demo', 'mapKey')
* const key = new Aerospike.Key('test', 'demo', 'listKey')
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!
* var config = {
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aerospike",
"version": "5.10.0",
"version": "5.11.0",
"description": "Aerospike Client Library",
"keywords": [
"aerospike",
Expand Down

0 comments on commit 8680a05

Please sign in to comment.