How can I access Vuex Store from Node.js?

I have to access a state from server. I want to change the twitterName with a mutation after figure out from this. I set a getter but when I try to import store to js file it sends error. How can I import a state?

import Vue from 'vue'
Cannot use import statement outside a module


const express = require('express')
const T = require('../../../src/lib/twitter')
const store = require('../../../src/store/index')

const router = express.Router()

router.get('/', (req, res) => {
  // const name = 'name123'
  const name = store.getters.twitterName
    { from: name, count: 5 },
    function (err, data, response) {
      if (err) {
        return res.status(400).json('Oops! Something went wrong.')

module.exports = router


import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'


export default new Vuex.Store({
  state: {
    twitterName: 'name1234'
  getters: {
    twitterName: (state) => state.twitterName

That’s not how it works.
Vuex is client side.