Alpine install nodejs code example

Example 1: docker node alpine

# Copy and paste to pull this image for the latest 
docker pull node

# more specific use this line
# docker pull node:<version>-alpine 
docker pull node:14.4-alpine3.11

Example 2: alpine.js install

<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js" defer></script>

Example 3: alpine js

<div x-data="{ tab: 'foo' }">
    <button :class="{ 'active': tab === 'foo' }" @click="tab = 'foo'">Foo</button>
    <button :class="{ 'active': tab === 'bar' }" @click="tab = 'bar'">Bar</button>

    <div x-show="tab === 'foo'">Вкладка Foo</div>
    <div x-show="tab === 'bar'">Вкладка Bar</div>
</div>